Separate the collection from beets output in tests #114
@ -76,9 +76,9 @@ fn test_album_artist_query() {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let expected: Vec<Item> = LIBRARY_ITEMS
|
let expected: Vec<Item> = LIBRARY_ITEMS
|
||||||
.to_owned()
|
.iter()
|
||||||
.into_iter()
|
|
||||||
.filter(|it| it.album_artist == "Аркона")
|
.filter(|it| it.album_artist == "Аркона")
|
||||||
|
.cloned()
|
||||||
.collect();
|
.collect();
|
||||||
assert_eq!(output, expected);
|
assert_eq!(output, expected);
|
||||||
}
|
}
|
||||||
@ -93,9 +93,9 @@ fn test_album_title_query() {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let expected: Vec<Item> = LIBRARY_ITEMS
|
let expected: Vec<Item> = LIBRARY_ITEMS
|
||||||
.to_owned()
|
.iter()
|
||||||
.into_iter()
|
|
||||||
.filter(|it| it.album_title == "Slovo")
|
.filter(|it| it.album_title == "Slovo")
|
||||||
|
.cloned()
|
||||||
.collect();
|
.collect();
|
||||||
assert_eq!(output, expected);
|
assert_eq!(output, expected);
|
||||||
}
|
}
|
||||||
@ -109,9 +109,9 @@ fn test_exclude_query() {
|
|||||||
.list(Query::new().exclude(Field::AlbumArtist(String::from("Аркона"))))
|
.list(Query::new().exclude(Field::AlbumArtist(String::from("Аркона"))))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let expected: Vec<Item> = LIBRARY_ITEMS
|
let expected: Vec<Item> = LIBRARY_ITEMS
|
||||||
.to_owned()
|
.iter()
|
||||||
.into_iter()
|
|
||||||
.filter(|it| it.album_artist != "Аркона")
|
.filter(|it| it.album_artist != "Аркона")
|
||||||
|
.cloned()
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let output: HashSet<_> = output.iter().collect();
|
let output: HashSet<_> = output.iter().collect();
|
||||||
|
Loading…
Reference in New Issue
Block a user