test(gpodder_sqlite): update tests so they work again

signup-links
Jef Roosens 2025-04-05 09:06:05 +02:00
parent 974ca80298
commit f3ede6f9a6
Signed by: Jef Roosens
GPG Key ID: 02D4C0997E74717B
1 changed files with 5 additions and 3 deletions

View File

@ -35,7 +35,7 @@ fn test_create_session() {
let new_session = Session {
id: 123,
//
user_agent: None,
last_seen: chrono::Utc::now().trunc_subsecs(0),
user: users[0].clone(),
};
@ -56,7 +56,7 @@ fn test_remove_session() {
let new_session = Session {
id: 123,
//
user_agent: None,
last_seen: chrono::Utc::now().trunc_subsecs(0),
user: users[0].clone(),
};
@ -86,7 +86,7 @@ fn test_refresh_session() {
let mut new_session = Session {
id: 123,
//
user_agent: None,
last_seen: chrono::Utc::now().trunc_subsecs(0) - TimeDelta::seconds(10),
user: users[0].clone(),
};
@ -124,6 +124,7 @@ fn test_remove_old_sessions() {
store
.insert_session(&Session {
id: i as i64,
user_agent: None,
last_seen: ts,
user: users[0].clone(),
})
@ -143,6 +144,7 @@ fn test_remove_old_sessions() {
store.get_session(0).expect("get session shouldn't fail"),
Some(Session {
id: 0,
user_agent: None,
last_seen: now,
user: users[0].clone(),
})