use domain::Value; use rss_adapter::{RssError, parse_rss}; const SAMPLE_RSS: &str = r#" Test Feed https://example.com First Article Description of first article https://example.com/1 Second Article Description of second https://example.com/2 "#; #[test] fn parses_rss_into_value() { let result = parse_rss(SAMPLE_RSS).unwrap(); assert_eq!( result.get_path("$.title"), Some(&Value::String("Test Feed".into())) ); assert_eq!( result.get_path("$.items[0].title"), Some(&Value::String("First Article".into())) ); assert_eq!( result.get_path("$.items[1].title"), Some(&Value::String("Second Article".into())) ); assert_eq!( result.get_path("$.items[0].description"), Some(&Value::String("Description of first article".into())) ); }