From f9d7589f25395992e0ba06d3a89c97664433bb3f Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Sat, 7 Jun 2025 13:27:18 -0400 Subject: [PATCH] Got another test working --- src/main.rs | 39 +++++++++++++-------------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/src/main.rs b/src/main.rs index fdbb7e8..3f36c4f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -889,34 +889,21 @@ mod tests { get_resp_data::(response).await; assert_eq!(false, resp.data.is_empty(), "Should not be empty"); assert_eq!(false, resp.data[0].is_nil(), "Should not be empty"); + let id = resp.data[0]; - match fetch_queue_req(&app).await { - Ok(response) => { - let resp = get_resp_data::< - crate::callers::song::response::fetch_queue_song::Response, - >(response) - .await; - assert_eq!(false, resp.data.is_empty(), "Should not be empty"); - let id = resp.data[0].id; - - match fetch_queue_data_req(&app, &id).await { - Ok(response) => match resp_to_bytes(response).await { - Ok(bytes) => { - assert_eq!( - false, - bytes.is_empty(), - "Queued data should not be empty" - ); - } - Err(err) => { - assert!(false, "Error: {:?}", err); - } - }, - Err(err) => { - assert!(false, "Error: {:?}", err); - } + match fetch_queue_data_req(&app, &id).await { + Ok(response) => match resp_to_bytes(response).await { + Ok(bytes) => { + assert_eq!( + false, + bytes.is_empty(), + "Queued data should not be empty" + ); } - } + Err(err) => { + assert!(false, "Error: {:?}", err); + } + }, Err(err) => { assert!(false, "Error: {:?}", err); }