mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-18 14:01:04 +00:00
fix: list applications test
This commit is contained in:
parent
3d8487f771
commit
fc176348d0
1 changed files with 3 additions and 3 deletions
|
|
@ -97,16 +97,16 @@ pub mod tests {
|
|||
const APPLICATION_ID: i32 = 103151;
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_list_candidates() {
|
||||
async fn test_list_applications() {
|
||||
let db = get_memory_sqlite_connection().await;
|
||||
let admin = create_admin(&db).await;
|
||||
let private_key = crypto::decrypt_password(admin.private_key, "admin".to_string()).await.unwrap();
|
||||
let candidates = CandidateService::list_candidates(&private_key, &db, None, None).await.unwrap();
|
||||
let candidates = ApplicationService::list_applications(&private_key, &db).await.unwrap();
|
||||
assert_eq!(candidates.len(), 0);
|
||||
|
||||
put_user_data(&db).await;
|
||||
|
||||
let candidates = CandidateService::list_candidates(&private_key, &db, None, None).await.unwrap();
|
||||
let candidates = ApplicationService::list_applications(&private_key, &db).await.unwrap();
|
||||
assert_eq!(candidates.len(), 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue