Skip to content

Commit

Permalink
change user exists test
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-loop-1 committed Sep 6, 2024
1 parent 64af518 commit 0a95455
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/tests/scenes/login/CreateAccountPage.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ describe('CreateAccountPage', () => {
// Add more assertions as needed
});

it('handles sign up failure with user already exists error', async () => {
it('handles sign up failure with email already exists error', async () => {
signUp.mockRejectedValueOnce({
response: {
data: { error: 'User already exists' },
data: { error: 'Email already exists' },
status: 400,
},
});
Expand All @@ -117,7 +117,7 @@ describe('CreateAccountPage', () => {
});

await waitFor(() => {
expect(screen.getByText('User already exists')).to.exist;
expect(screen.getByText('Email already exists')).to.exist;
});

expect(signUp).toHaveBeenCalledWith({ username: 'testuser', email: '[email protected]', password: 'Password1!' });
Expand Down

0 comments on commit 0a95455

Please sign in to comment.