summaryrefslogtreecommitdiff
path: root/src/user/handlers/login/test.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/handlers/login/test.rs')
-rw-r--r--src/user/handlers/login/test.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/user/handlers/login/test.rs b/src/user/handlers/login/test.rs
index b8f24f6..bdd1957 100644
--- a/src/user/handlers/login/test.rs
+++ b/src/user/handlers/login/test.rs
@@ -1,6 +1,6 @@
use axum::extract::{Json, State};
-use crate::{test::fixtures, token::app};
+use crate::{empty::Empty, test::fixtures, token::app};
#[tokio::test]
async fn correct_credentials() {
@@ -17,14 +17,13 @@ async fn correct_credentials() {
name: name.clone(),
password,
};
- let (identity, Json(response)) =
+ let (identity, Empty) =
super::handler(State(app.clone()), logged_in_at, identity, Json(request))
.await
.expect("logged in with valid credentials");
// Verify the return value's basic structure
- assert_eq!(name, response.name);
let secret = identity
.secret()
.expect("logged in with valid credentials issues an identity cookie");
@@ -38,7 +37,7 @@ async fn correct_credentials() {
.await
.expect("identity secret is valid");
- assert_eq!(response, validated_login);
+ assert_eq!(name, validated_login.name);
}
#[tokio::test]