summaryrefslogtreecommitdiff
path: root/src/test/fixtures
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-10-09 00:57:31 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-10-09 11:45:31 -0400
commitba96974bdebd6d4ec345907d49944b5ee644ed47 (patch)
tree8811ef8981a915a8cc17d8a1e576750b31cbdd0b /src/test/fixtures
parentda1810afc5a627a518131cfb0af0996c5ec60bcf (diff)
Provide a view of logins to clients.
Diffstat (limited to 'src/test/fixtures')
-rw-r--r--src/test/fixtures/login.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/fixtures/login.rs b/src/test/fixtures/login.rs
index 00c2789..e5ac716 100644
--- a/src/test/fixtures/login.rs
+++ b/src/test/fixtures/login.rs
@@ -3,23 +3,24 @@ use uuid::Uuid;
use crate::{
app::App,
+ clock::RequestedAt,
login::{self, Login, Password},
};
-pub async fn create_with_password(app: &App) -> (String, Password) {
+pub async fn create_with_password(app: &App, created_at: &RequestedAt) -> (String, Password) {
let (name, password) = propose();
app.logins()
- .create(&name, &password)
+ .create(&name, &password, created_at)
.await
.expect("should always succeed if the login is actually new");
(name, password)
}
-pub async fn create(app: &App) -> Login {
+pub async fn create(app: &App, created_at: &RequestedAt) -> Login {
let (name, password) = propose();
app.logins()
- .create(&name, &password)
+ .create(&name, &password, created_at)
.await
.expect("should always succeed if the login is actually new")
}