From 5b79ac771c65fa8430bcf50aad35bf3a9e3a8225 Mon Sep 17 00:00:00 2001 From: Antoine Moreaux Date: Thu, 6 Feb 2025 16:33:41 +0100 Subject: [PATCH] fix(auth): update error message in sign-in-up service test (#10056) Revised exception message for better clarity when a user is not part of the workspace. Adjusts test expectations to match the updated error output. --- .../core-modules/auth/services/sign-in-up.service.spec.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.spec.ts b/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.spec.ts index 4df8a9045..f152408d7 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.spec.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.spec.ts @@ -301,16 +301,13 @@ describe('SignInUpService', () => { }; jest.spyOn(environmentService, 'get').mockReturnValue(false); - jest - .spyOn(userWorkspaceService, 'addUserToWorkspace') - .mockResolvedValue({} as User); jest .spyOn(userWorkspaceService, 'checkUserWorkspaceExists') .mockResolvedValue(null); await expect(() => service.signInUp(params)).rejects.toThrow( new AuthException( - 'Workspace is not ready to welcome new members', + 'User is not part of the workspace', AuthExceptionCode.FORBIDDEN_EXCEPTION, ), );