From 0a954556aee900346629dd3922687f4b4ac45a62 Mon Sep 17 00:00:00 2001 From: mr-loop-1 Date: Fri, 6 Sep 2024 10:11:35 +0530 Subject: [PATCH] change user exists test --- frontend/src/tests/scenes/login/CreateAccountPage.test.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/tests/scenes/login/CreateAccountPage.test.jsx b/frontend/src/tests/scenes/login/CreateAccountPage.test.jsx index 4183122f..5932b545 100644 --- a/frontend/src/tests/scenes/login/CreateAccountPage.test.jsx +++ b/frontend/src/tests/scenes/login/CreateAccountPage.test.jsx @@ -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, }, }); @@ -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: 'test@example.com', password: 'Password1!' });