Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
Now correctly testing phone and password login function
  • Loading branch information
Proziam committed Sep 22, 2024
1 parent ead26b2 commit 9c76fde
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/client_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ async fn sign_in_with_password_test_valid() {

let session = auth_client
.sign_in_with_email_and_password(demo_email, demo_password)
.await;
.await
.unwrap();

assert!(session.unwrap().user.email == demo_email)
assert!(session.user.email == demo_email)
}

#[tokio::test]
Expand Down Expand Up @@ -73,10 +74,11 @@ async fn sign_in_with_phone_and_password_test() {
headers.insert("apikey", auth_client.api_key.parse().unwrap());

let session = auth_client
.sign_in_with_email_and_password(demo_phone, demo_password)
.await;
.sign_in_with_phone_and_password(demo_phone, demo_password)
.await
.unwrap();

assert!(session.is_err())
assert!(session.user.phone == demo_phone)
}

#[tokio::test]
Expand Down

0 comments on commit 9c76fde

Please sign in to comment.