Feed: enchance get_stuff unit test.

This commit is contained in:
Jordan Petridis
2018-02-03 15:55:26 +02:00
parent 97c65c8bd1
commit 92d01ec51a
3 changed files with 768 additions and 1 deletions
+10 -1
View File
@@ -203,6 +203,15 @@ mod tests {
let (insert, update) = feed.get_stuff(&pd).wait().unwrap();
assert_eq!(43, insert.len());
assert_eq!(0, update.len());
// TODO: find or create a feed to test updates too.
feed.index().wait().unwrap();
let path = "tests/feeds/2018-02-03-Intercepted.xml";
let feed = get_feed(path, 42);
let pd = feed.parse_podcast().to_podcast().unwrap();
let (insert, update) = feed.get_stuff(&pd).wait().unwrap();
assert_eq!(4, insert.len());
assert_eq!(43, update.len());
}
}