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.
This commit is contained in:
@ -301,16 +301,13 @@ describe('SignInUpService', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
jest.spyOn(environmentService, 'get').mockReturnValue(false);
|
jest.spyOn(environmentService, 'get').mockReturnValue(false);
|
||||||
jest
|
|
||||||
.spyOn(userWorkspaceService, 'addUserToWorkspace')
|
|
||||||
.mockResolvedValue({} as User);
|
|
||||||
jest
|
jest
|
||||||
.spyOn(userWorkspaceService, 'checkUserWorkspaceExists')
|
.spyOn(userWorkspaceService, 'checkUserWorkspaceExists')
|
||||||
.mockResolvedValue(null);
|
.mockResolvedValue(null);
|
||||||
|
|
||||||
await expect(() => service.signInUp(params)).rejects.toThrow(
|
await expect(() => service.signInUp(params)).rejects.toThrow(
|
||||||
new AuthException(
|
new AuthException(
|
||||||
'Workspace is not ready to welcome new members',
|
'User is not part of the workspace',
|
||||||
AuthExceptionCode.FORBIDDEN_EXCEPTION,
|
AuthExceptionCode.FORBIDDEN_EXCEPTION,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user