Next queued song #123

Merged
kdeng00 merged 9 commits from next_queued_song into v0.2 2025-04-26 16:11:46 -04:00
2 changed files with 8 additions and 8 deletions
Showing only changes of commit 781d541fbe - Show all commits
-1
View File
@@ -47,7 +47,6 @@ mod song_queue {
pub id: uuid::Uuid,
pub filename: String,
pub status: String,
// pub data: Vec<u8>,
}
pub async fn insert(
+8 -7
View File
@@ -307,16 +307,17 @@ mod tests {
.method(axum::http::Method::GET)
.uri(crate::callers::endpoints::NEXTQUEUESONG)
.header(axum::http::header::CONTENT_TYPE, "application/json")
.body(axum::body::Body::empty()).unwrap();
.body(axum::body::Body::empty())
.unwrap();
match app.clone().oneshot(fetch_req).await {
Ok(response) => {
let body = axum::body::to_bytes(response.into_body(), usize::MAX)
.await
.unwrap();
let resp: crate::callers::song::response::fetch_queue_song::Response =
serde_json::from_slice(&body).unwrap();
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
let body = axum::body::to_bytes(response.into_body(), usize::MAX)
.await
.unwrap();
let resp: crate::callers::song::response::fetch_queue_song::Response =
serde_json::from_slice(&body).unwrap();
assert_eq!(false, resp.data.is_empty(), "Should not be empty");
}
Err(err) => {
assert!(false, "Error: {:?}", err);