summaryrefslogtreecommitdiff
path: root/src/test/fixtures/identity.rs
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-08-24 17:03:16 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-08-26 01:08:11 -0400
commit0bbc83f09cc7517dddf16770a15f9e90815f48ba (patch)
tree4b7ea51aab2e9255fb8832d3109b4bc8dc033f0c /src/test/fixtures/identity.rs
parent218d6dbb56727721d19019c8514f5e4395596e98 (diff)
Generate tokens in memory and then store them.
This is the leading edge of a larger storage refactoring, where repo types stop doing things like generating secrets or deciding whether to carry out an operation. To make this work, there is now a `Token` type that holds the complete state of a token, in memory.
Diffstat (limited to 'src/test/fixtures/identity.rs')
-rw-r--r--src/test/fixtures/identity.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/fixtures/identity.rs b/src/test/fixtures/identity.rs
index 29ff5ae..ac353de 100644
--- a/src/test/fixtures/identity.rs
+++ b/src/test/fixtures/identity.rs
@@ -5,7 +5,7 @@ use crate::{
password::Password,
test::fixtures,
token::{
- self,
+ Token,
extract::{Identity, IdentityCookie},
},
};
@@ -37,8 +37,8 @@ pub async fn logged_in(
}
pub fn fictitious() -> Identity {
- let token = token::Id::generate();
let user = fixtures::user::fictitious();
+ let (token, _) = Token::generate(&user, &fixtures::now());
Identity { token, user }
}