Added auth

This commit is contained in:
Connor Johnstone
2026-03-19 14:02:09 -04:00
parent c6452609d6
commit a9d414bffa
10 changed files with 271 additions and 24 deletions

View File

@@ -167,12 +167,15 @@ async fn test_wanted_items_lifecycle() {
// Add wanted item
let item = queries::wanted::add(
conn,
ItemType::Artist,
"Radiohead",
None,
Some(artist.id),
None,
None,
queries::wanted::AddWantedItem {
item_type: ItemType::Artist,
name: "Radiohead",
musicbrainz_id: None,
artist_id: Some(artist.id),
album_id: None,
track_id: None,
user_id: None,
},
)
.await
.unwrap();
@@ -180,12 +183,12 @@ async fn test_wanted_items_lifecycle() {
assert_eq!(item.item_type, ItemType::Artist);
// List with filter
let wanted = queries::wanted::list(conn, Some(WantedStatus::Wanted))
let wanted = queries::wanted::list(conn, Some(WantedStatus::Wanted), None)
.await
.unwrap();
assert_eq!(wanted.len(), 1);
let downloaded = queries::wanted::list(conn, Some(WantedStatus::Downloaded))
let downloaded = queries::wanted::list(conn, Some(WantedStatus::Downloaded), None)
.await
.unwrap();
assert!(downloaded.is_empty());
@@ -198,7 +201,7 @@ async fn test_wanted_items_lifecycle() {
// Remove
queries::wanted::remove(conn, item.id).await.unwrap();
let all = queries::wanted::list(conn, None).await.unwrap();
let all = queries::wanted::list(conn, None, None).await.unwrap();
assert!(all.is_empty());
}