1
0
Fork 0
mirror of synced 2024-07-01 20:41:03 +12:00

Updating test - performs signup and deletion flow

Including two more steps within this test.

- Verify the self response is unauthorized
- Verify the self response matches the account

This will cover the '/api/auth/self' endpoint
This commit is contained in:
Mitch-Budibase 2023-08-01 16:46:11 +01:00
parent c18324c879
commit 3c3dd9c95a

View file

@ -45,9 +45,15 @@ describe("Accounts", () => {
// Send the verification request
await config.accountsApi.accounts.verifyAccount(code!)
// Verify self response is unauthorized
await config.api.accounts.self({ status: 403 })
// Can now log in to the account
await config.loginAsAccount(createAccountRequest)
// Verify self response matches account
await config.api.accounts.self()
// Delete account
await config.api.accounts.deleteCurrentAccount()