Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
szabgab committed Sep 24, 2024
1 parent 0d8a3d0 commit bd232c0
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions src/test_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,28 @@ async fn test_db_update_user() {
}
);

db::save_password(&dbh, 1, "new password").await.unwrap();
let admin = get_user_by_id(&dbh, 1).await.unwrap().unwrap();
assert_eq!(
admin,
User {
uid: 1,
email: ADMIN_EMAIL.to_string(),
password: String::from("new password"),
name: "New Name".to_string(),
code: String::from("generated code"),
process: String::from("register"),
verified: false,
registration_date: admin.registration_date,
verification_date: None,
code_generated_date: admin.code_generated_date,
github: Some(String::from("foogh")),
gitlab: Some(String::from("foogl")),
linkedin: Some(String::from("https://linkedin.com/")),
about: Some(String::from("about")),
}
);

teardown(dbh, db_name).await;
}

Expand Down Expand Up @@ -854,5 +876,3 @@ async fn test_db_update_event() {

teardown(dbh, db_name).await;
}

// save_password

0 comments on commit bd232c0

Please sign in to comment.