Register endpoint #16
10
src/main.rs
10
src/main.rs
@@ -65,16 +65,9 @@ mod tests {
|
||||
http::{Request, StatusCode},
|
||||
};
|
||||
use http_body_util::BodyExt;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::json;
|
||||
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 {
|
||||
use std::str::FromStr;
|
||||
|
||||
@@ -227,7 +220,8 @@ mod tests {
|
||||
let body = axum::body::to_bytes(resp.into_body(), usize::MAX)
|
||||
.await
|
||||
.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");
|
||||
|
||||
|
Reference in New Issue
Block a user