update tests to use current date

This commit is contained in:
2023-11-16 15:35:52 +01:00
parent a3c7461c2b
commit 5b4238da92
2 changed files with 24 additions and 13 deletions

View File

@ -797,6 +797,8 @@ mod test {
let logbook = Logbook::find_by_id(&pool, 1).await.unwrap();
let user = User::find_by_id(&pool, 2).await.unwrap();
let current_date = chrono::Local::now().format("%Y-%m-%d").to_string();
logbook
.home(
&pool,
@ -810,8 +812,8 @@ mod test {
shipmaster: Some(2),
steering_person: Some(2),
shipmaster_only_steering: false,
departure: "1990-01-01T10:00".into(),
arrival: "1990-01-01T12:00".into(),
departure: format!("{}T10:00", current_date),
arrival: format!("{}T12:00", current_date),
},
)
.await