diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-08-24 16:00:45 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-08-25 22:42:49 -0400 |
| commit | 6c65e97e49d1d56380aa7d71abb0394b08ff60ca (patch) | |
| tree | fddb2511233a89c43ac9e4d45ba37bd333dd11e5 /src/user/handlers/password/test.rs | |
| parent | 5bc9dc01618421596d65a7046e46559a872c6693 (diff) | |
Return an identity, rather than the parts of an identity, when validating an identity token.
This is a small refactoring that's been possible for a while, and we only just noticed.
Diffstat (limited to 'src/user/handlers/password/test.rs')
| -rw-r--r-- | src/user/handlers/password/test.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/user/handlers/password/test.rs b/src/user/handlers/password/test.rs index ffa12f3..c0f789b 100644 --- a/src/user/handlers/password/test.rs +++ b/src/user/handlers/password/test.rs @@ -38,12 +38,12 @@ async fn password_change() { let new_secret = new_cookie .secret() .expect("we should have a secret after changing our password"); - let (_, login) = app + let new_identity = app .tokens() .validate(&new_secret, &fixtures::now()) .await .expect("the newly-issued secret should be valid"); - assert_eq!(identity.user, login); + assert_eq!(identity.user, new_identity.user); // Verify that our original token is no longer valid let validate_err = app @@ -72,10 +72,10 @@ async fn password_change() { .login(&name, &to, &fixtures::now()) .await .expect("logging in with the new password should succeed"); - let (_, login) = app + let identity = app .tokens() .validate(&secret, &fixtures::now()) .await .expect("validating a newly-issued token secret succeeds"); - assert_eq!(identity.user, login); + assert_eq!(name, identity.user.name); } |
