test: fix tests

This commit is contained in:
ThetaDev 2024-07-29 18:10:10 +02:00
parent 2c7a3fb5cc
commit 37a14aa9ce
No known key found for this signature in database
GPG key ID: E319D3C5148D65B6
3 changed files with 10 additions and 6 deletions

View file

@ -201,11 +201,11 @@ MusicAlbum(
cover: [], cover: [],
artists: [ artists: [
ArtistId( ArtistId(
id: Some("UCxByvsK9hDZk2MnnF9jsFGw"), id: Some("UCzXI_RZ1Uqy8L8TiurTFTIg"),
name: "Herbrido", name: "Herbrido",
), ),
], ],
artist_id: Some("UCxByvsK9hDZk2MnnF9jsFGw"), artist_id: Some("UCzXI_RZ1Uqy8L8TiurTFTIg"),
album: Some(AlbumId( album: Some(AlbumId(
id: "MPREb_Z81wHtF9fhC", id: "MPREb_Z81wHtF9fhC",
name: "June Compilation", name: "June Compilation",

View file

@ -201,11 +201,11 @@ MusicAlbum(
cover: [], cover: [],
artists: [ artists: [
ArtistId( ArtistId(
id: Some("UCxByvsK9hDZk2MnnF9jsFGw"), id: Some("UCzXI_RZ1Uqy8L8TiurTFTIg"),
name: "[name]", name: "[name]",
), ),
], ],
artist_id: Some("UCxByvsK9hDZk2MnnF9jsFGw"), artist_id: Some("UCzXI_RZ1Uqy8L8TiurTFTIg"),
album: Some(AlbumId( album: Some(AlbumId(
id: "MPREb_Z81wHtF9fhC", id: "MPREb_Z81wHtF9fhC",
name: "[name]", name: "[name]",

View file

@ -1264,7 +1264,11 @@ mod channel_rss {
#[rstest] #[rstest]
#[tokio::test] #[tokio::test]
async fn search(rp: RustyPipe, unlocalized: bool) { async fn search(rp: RustyPipe, unlocalized: bool) {
let result = rp.query().search::<YouTubeItem, _>("testt").await.unwrap(); let result = rp
.query()
.search::<YouTubeItem, _>("arudino")
.await
.unwrap();
assert_gteo( assert_gteo(
result.items.count, result.items.count,
@ -1273,7 +1277,7 @@ async fn search(rp: RustyPipe, unlocalized: bool) {
); );
if unlocalized { if unlocalized {
assert_eq!(result.corrected_query.as_deref(), Some("test")); assert_eq!(result.corrected_query.as_deref(), Some("arduino"));
} }
assert_next(result.items, rp.query(), 10, 2, true).await; assert_next(result.items, rp.query(), 10, 2, true).await;