Separate the collection from beets output in tests #114

Merged
wojtek merged 8 commits from 113---separate-the-collection-from-beets-output-in-tests into main 2024-01-21 15:29:37 +01:00
Showing only changes of commit 8f0fd0ffb7 - Show all commits

View File

@ -76,9 +76,9 @@ fn test_album_artist_query() {
.unwrap();
let expected: Vec<Item> = LIBRARY_ITEMS
.to_owned()
.into_iter()
.iter()
.filter(|it| it.album_artist == "Аркона")
.cloned()
.collect();
assert_eq!(output, expected);
}
@ -93,9 +93,9 @@ fn test_album_title_query() {
.unwrap();
let expected: Vec<Item> = LIBRARY_ITEMS
.to_owned()
.into_iter()
.iter()
.filter(|it| it.album_title == "Slovo")
.cloned()
.collect();
assert_eq!(output, expected);
}
@ -109,9 +109,9 @@ fn test_exclude_query() {
.list(Query::new().exclude(Field::AlbumArtist(String::from("Аркона"))))
.unwrap();
let expected: Vec<Item> = LIBRARY_ITEMS
.to_owned()
.into_iter()
.iter()
.filter(|it| it.album_artist != "Аркона")
.cloned()
.collect();
let output: HashSet<_> = output.iter().collect();