Skip to content

Commit

Permalink
Add basic test to read RSS file
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed Mar 3, 2015
1 parent e375878 commit 39b23d5
Show file tree
Hide file tree
Showing 2 changed files with 388 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@ mod test {
assert_eq!(rss.to_string(), "<?xml version=\'1.0\' encoding=\'UTF-8\'?><rss version=\'2.0\'><channel><title>My Blog</title><link>http://myblog.com</link><description>Where I write stuff</description><item><title>My first post!</title><link>http://myblog.com/post1</link><description>This is my first post</description></item></channel></rss>");
}

#[test]
fn test_from_file() {
let mut file = File::open("test-data/pinboard.xml").unwrap();
let Rss(channel) = Rss::from_read(&mut file);
}

#[test]
#[should_fail]
fn test_from_read_no_channels() {
Expand Down

0 comments on commit 39b23d5

Please sign in to comment.