mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-24 17:11:49 +00:00
fix: find_session_by_uuid test
This commit is contained in:
parent
d0290155c5
commit
b3e2b38b5f
1 changed files with 3 additions and 2 deletions
|
|
@ -49,13 +49,14 @@ mod tests {
|
||||||
async fn test_find_session_by_uuid() {
|
async fn test_find_session_by_uuid() {
|
||||||
let db = get_memory_sqlite_connection().await;
|
let db = get_memory_sqlite_connection().await;
|
||||||
|
|
||||||
|
let (application, _, _) = put_user_data(&db).await;
|
||||||
let session = session::ActiveModel {
|
let session = session::ActiveModel {
|
||||||
id: Set(Uuid::new_v4()),
|
id: Set(Uuid::new_v4()),
|
||||||
|
candidate_id: Set(application.id),
|
||||||
ip_address: Set("10.10.10.10".to_string()),
|
ip_address: Set("10.10.10.10".to_string()),
|
||||||
created_at: Set(chrono::offset::Local::now().naive_local()),
|
created_at: Set(chrono::offset::Local::now().naive_local()),
|
||||||
expires_at: Set(chrono::offset::Local::now().naive_local()),
|
expires_at: Set(chrono::offset::Local::now().naive_local()),
|
||||||
updated_at: Set(chrono::offset::Local::now().naive_local()),
|
updated_at: Set(chrono::offset::Local::now().naive_local())
|
||||||
..Default::default()
|
|
||||||
}
|
}
|
||||||
.insert(&db)
|
.insert(&db)
|
||||||
.await
|
.await
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue