Skip to content

Commit

Permalink
added more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fomalhautb committed Oct 3, 2024
1 parent 569551f commit 86bf3c7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions apps/e2e/tests/backend/endpoints/api/v1/auth-flows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,18 @@ it("signs in with OTP, disable used for auth, then should not be able to sign in
}
`);
});

it("signs in with OTP first, then signs in with oauth should give an account with used_for_auth false", async ({ expect }) => {
await Auth.Otp.signIn();

const cc = await ContactChannels.getTheOnlyContactChannel();
expect(cc.is_verified).toBe(true);
expect(cc.used_for_auth).toBe(true);

await Auth.OAuth.signIn();

const cc2 = await ContactChannels.getTheOnlyContactChannel();
expect(cc2.value).toBe(cc.value);
expect(cc2.is_verified).toBe(false);
expect(cc2.used_for_auth).toBe(false);
});

0 comments on commit 86bf3c7

Please sign in to comment.