mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix: Fix typeorm .save usage (no-changelog) (#8678)
This commit is contained in:
@@ -192,6 +192,17 @@ describe('MeController', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('storeSurveyAnswers', () => {
|
||||
it('should throw BadRequestError if answers are missing in the payload', async () => {
|
||||
const req = mock<MeRequest.SurveyAnswers>({
|
||||
body: undefined,
|
||||
});
|
||||
await expect(controller.storeSurveyAnswers(req)).rejects.toThrowError(
|
||||
new BadRequestError('Personalization answers are mandatory'),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('API Key methods', () => {
|
||||
let req: AuthenticatedRequest;
|
||||
beforeAll(() => {
|
||||
|
||||
@@ -95,7 +95,7 @@ describe('OwnerController', () => {
|
||||
|
||||
await controller.setupOwner(req, res);
|
||||
|
||||
expect(userRepository.save).toHaveBeenCalledWith(user);
|
||||
expect(userRepository.save).toHaveBeenCalledWith(user, { transaction: false });
|
||||
|
||||
const cookieOptions = captor<CookieOptions>();
|
||||
expect(res.cookie).toHaveBeenCalledWith(AUTH_COOKIE_NAME, 'signed-token', cookieOptions);
|
||||
|
||||
Reference in New Issue
Block a user