From 01e045495b8758980453bcc2e32fc68f5fb1d159 Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Wed, 18 Jun 2025 19:38:35 -0400 Subject: [PATCH] Test payload changes --- src/main.rs | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/main.rs b/src/main.rs index 35e4727..a838081 100644 --- a/src/main.rs +++ b/src/main.rs @@ -327,7 +327,7 @@ mod tests { app: &axum::Router, id: &uuid::Uuid, ) -> Result { - let payload = queue_metadata_payload_data(&id).await; + let payload = payload_data::queue_metadata_payload_data(&id).await; let req = axum::http::Request::builder() .method(axum::http::Method::POST) @@ -600,22 +600,24 @@ mod tests { serde_json::from_slice(&body).unwrap() } - pub async fn queue_metadata_payload_data(id: &uuid::Uuid) -> serde_json::Value { - serde_json::json!( - { - "id": id, - "album" : "Machine Gun: The FillMore East First Show", - "album_artist" : "Jimi Hendrix", - "artist" : "Jimi Hendrix", - "disc" : 1, - "disc_count" : 1, - "duration" : 330, - "genre" : "Psychadelic Rock", - "title" : "Power of Soul", - "track" : 1, - "track_count" : 11, - "year" : 2016 - }) + pub mod payload_data { + pub async fn queue_metadata_payload_data(id: &uuid::Uuid) -> serde_json::Value { + serde_json::json!( + { + "song_queue_id": id, + "album" : "Machine Gun: The FillMore East First Show", + "album_artist" : "Jimi Hendrix", + "artist" : "Jimi Hendrix", + "disc" : 1, + "disc_count" : 1, + "duration" : 330, + "genre" : "Psychadelic Rock", + "title" : "Power of Soul", + "track" : 1, + "track_count" : 11, + "year" : 2016 + }) + } } #[tokio::test]