diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-08-24 03:48:17 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-08-24 04:51:24 -0400 |
| commit | 4eb63b8adda4559df3dadcf721e2bb0d1f65a01f (patch) | |
| tree | 4fc62e30770ec84be431a5dabc2aead3eaad88f9 /src/user/handlers/login/test.rs | |
| parent | 1a0ee4af6538b5486d35730d480d00ca4d9edafb (diff) | |
Stop returning body data from `POST /api/auth/login`.
As with `/api/setup`, the response was an ad-hoc choice, which we are not using and which constrains future development just by existing.
Diffstat (limited to 'src/user/handlers/login/test.rs')
| -rw-r--r-- | src/user/handlers/login/test.rs | 7 |
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] |
