cargo fmt
This commit is contained in:
+13
-4
@@ -231,8 +231,10 @@ pub mod requests {
|
|||||||
app: &axum::Router,
|
app: &axum::Router,
|
||||||
user_id: &uuid::Uuid,
|
user_id: &uuid::Uuid,
|
||||||
) -> Result<axum::response::Response, axum::http::Error> {
|
) -> Result<axum::response::Response, axum::http::Error> {
|
||||||
|
let url = super::util::format_url_with_value(
|
||||||
let url = super::util::format_url_with_value(textsender_auth::callers::endpoints::GET_USER_PROFILE, user_id);
|
textsender_auth::callers::endpoints::GET_USER_PROFILE,
|
||||||
|
user_id,
|
||||||
|
);
|
||||||
match axum::http::Request::builder()
|
match axum::http::Request::builder()
|
||||||
.method(axum::http::Method::GET)
|
.method(axum::http::Method::GET)
|
||||||
.uri(url)
|
.uri(url)
|
||||||
@@ -1061,11 +1063,18 @@ async fn test_get_user_profile() {
|
|||||||
|
|
||||||
match requests::get_user_profile(&app, &user_id).await {
|
match requests::get_user_profile(&app, &user_id).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
match util::convert_response::<textsender_auth::callers::login::response::GetUserProfileResponse>(response).await {
|
match util::convert_response::<
|
||||||
|
textsender_auth::callers::login::response::GetUserProfileResponse,
|
||||||
|
>(response)
|
||||||
|
.await
|
||||||
|
{
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
assert_eq!(false, response.data.is_empty(), "No User Profile found");
|
assert_eq!(false, response.data.is_empty(), "No User Profile found");
|
||||||
let user_profile = &response.data[0];
|
let user_profile = &response.data[0];
|
||||||
assert_eq!(TEST_USERNAME, user_profile.username, "Username does not match");
|
assert_eq!(
|
||||||
|
TEST_USERNAME, user_profile.username,
|
||||||
|
"Username does not match"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
assert!(false, "Error: {err:?}");
|
assert!(false, "Error: {err:?}");
|
||||||
|
|||||||
Reference in New Issue
Block a user