Changes
All checks were successful
Rust Build / Check (pull_request) Successful in 43s
Rust Build / Test Suite (pull_request) Successful in 53s
Rust Build / Rustfmt (pull_request) Successful in 28s
Rust Build / Clippy (pull_request) Successful in 57s
Rust Build / build (pull_request) Successful in 1m15s

This commit is contained in:
2025-04-04 22:33:32 -04:00
parent af72d79110
commit 83f0e777c9

View File

@@ -65,16 +65,9 @@ mod tests {
http::{Request, StatusCode}, http::{Request, StatusCode},
}; };
use http_body_util::BodyExt; use http_body_util::BodyExt;
use serde::{Deserialize, Serialize};
use serde_json::json; use serde_json::json;
use tower::ServiceExt; // for `call`, `oneshot`, and `ready` use tower::ServiceExt; // for `call`, `oneshot`, and `ready`
#[derive(Deserialize, Serialize)]
struct Response {
pub message: String,
pub data: icarus_auth::models::common::User,
}
mod db_mgr { mod db_mgr {
use std::str::FromStr; use std::str::FromStr;
@@ -227,7 +220,8 @@ mod tests {
let body = axum::body::to_bytes(resp.into_body(), usize::MAX) let body = axum::body::to_bytes(resp.into_body(), usize::MAX)
.await .await
.unwrap(); .unwrap();
let parsed_body: Response = serde_json::from_slice(&body).unwrap(); let parsed_body: callers::register::response::Response =
serde_json::from_slice(&body).unwrap();
assert_eq!(false, parsed_body.data.id.is_nil(), "Id is not populated"); assert_eq!(false, parsed_body.data.id.is_nil(), "Id is not populated");