tests: fix playlist search test
This commit is contained in:
parent
32b4800b46
commit
17fb2c98cb
1 changed files with 4 additions and 4 deletions
|
|
@ -1818,11 +1818,11 @@ fn music_search_artists_cont(rp: RustyPipe) {
|
||||||
#[case::default(true)]
|
#[case::default(true)]
|
||||||
fn music_search_playlists(#[case] with_community: bool, rp: RustyPipe, unlocalized: bool) {
|
fn music_search_playlists(#[case] with_community: bool, rp: RustyPipe, unlocalized: bool) {
|
||||||
let res = if with_community {
|
let res = if with_community {
|
||||||
tokio_test::block_on(rp.query().music_search_playlists("pop biggest hits")).unwrap()
|
tokio_test::block_on(rp.query().music_search_playlists("todays rock hits")).unwrap()
|
||||||
} else {
|
} else {
|
||||||
tokio_test::block_on(
|
tokio_test::block_on(
|
||||||
rp.query()
|
rp.query()
|
||||||
.music_search_playlists_filter("pop biggest hits", false),
|
.music_search_playlists_filter("todays rock hits", false),
|
||||||
)
|
)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
};
|
};
|
||||||
|
|
@ -1832,11 +1832,11 @@ fn music_search_playlists(#[case] with_community: bool, rp: RustyPipe, unlocaliz
|
||||||
.items
|
.items
|
||||||
.items
|
.items
|
||||||
.iter()
|
.iter()
|
||||||
.find(|p| p.id == "RDCLAK5uy_nmS3YoxSwVVQk9lEQJ0UX4ZCjXsW_psU8")
|
.find(|p| p.id == "RDCLAK5uy_nLtxizvEMkzYQUrA-bFf6MnBeR4bGYWUQ")
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
if unlocalized {
|
if unlocalized {
|
||||||
assert_eq!(playlist.name, "Pop's Biggest Hits");
|
assert_eq!(playlist.name, "Today's Rock Hits");
|
||||||
}
|
}
|
||||||
assert!(!playlist.thumbnail.is_empty(), "got no thumbnail");
|
assert!(!playlist.thumbnail.is_empty(), "got no thumbnail");
|
||||||
assert_gte(playlist.track_count.unwrap(), 100, "tracks");
|
assert_gte(playlist.track_count.unwrap(), 100, "tracks");
|
||||||
|
|
|
||||||
Reference in a new issue