From 0f7cbbf09680472f1254c0712f798eb00fb4a712 Mon Sep 17 00:00:00 2001 From: jake Date: Sat, 3 Oct 2020 20:12:11 -0600 Subject: [PATCH] fix tests again --- src/login/character.rs | 12 ++++++------ src/login/login.rs | 18 +++++++++--------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/login/character.rs b/src/login/character.rs index 997e46d..a06a513 100644 --- a/src/login/character.rs +++ b/src/login/character.rs @@ -677,10 +677,10 @@ mod test { username: "testuser".to_owned(), password: bcrypt::hash("mypassword", 5).unwrap(), guildcard: 0, + banned_until: None, + muted_until: None, + created_at: chrono::Utc::now(), team_id: None, - banned: false, - muted_until: SystemTime::now(), - created_at: SystemTime::now(), flags: 0, }); server.clients.insert(ClientId(5), clientstate); @@ -721,9 +721,9 @@ mod test { password: bcrypt::hash("qwer", 5).unwrap(), guildcard: 3, team_id: None, - banned: false, - muted_until: SystemTime::now(), - created_at: SystemTime::now(), + banned_until: None, + muted_until: None, + created_at: chrono::Utc::now(), flags: 0, }); diff --git a/src/login/login.rs b/src/login/login.rs index 22de67a..d105b64 100644 --- a/src/login/login.rs +++ b/src/login/login.rs @@ -186,9 +186,9 @@ mod test { password: bcrypt::hash("mypassword", 5).unwrap(), guildcard: 0, team_id: None, - banned: false, - muted_until: SystemTime::now(), - created_at: SystemTime::now(), + banned_until: None, + muted_until: None, + created_at: chrono::Utc::now(), flags: 0, }) } @@ -270,9 +270,9 @@ mod test { password: bcrypt::hash("notpassword", 5).unwrap(), guildcard: 0, team_id: None, - banned: false, - muted_until: SystemTime::now(), - created_at: SystemTime::now(), + banned_until: None, + muted_until: None, + created_at: chrono::Utc::now(), flags: 0, }) } @@ -315,9 +315,9 @@ mod test { password: bcrypt::hash("mypassword", 5).unwrap(), guildcard: 0, team_id: None, - banned: true, - muted_until: SystemTime::now(), - created_at: SystemTime::now(), + banned_until: Some(chrono::Utc::now() + chrono::Duration::days(1)), + muted_until: None, + created_at: chrono::Utc::now(), flags: 0, }) }