mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Make controller constructors consistent (no-changelog) (#7015)
This commit is contained in:
@@ -9,20 +9,14 @@ import { AUTH_COOKIE_NAME } from '@/constants';
|
||||
import { BadRequestError } from '@/ResponseHelper';
|
||||
import type { AuthenticatedRequest, MeRequest } from '@/requests';
|
||||
import { badPasswords } from '../shared/testData';
|
||||
import { UserService } from '@/services/user.service';
|
||||
import Container from 'typedi';
|
||||
import type { UserService } from '@/services/user.service';
|
||||
|
||||
describe('MeController', () => {
|
||||
const logger = mock<ILogger>();
|
||||
const externalHooks = mock<IExternalHooksClass>();
|
||||
const internalHooks = mock<IInternalHooksClass>();
|
||||
const userService = mock<UserService>();
|
||||
Container.set(UserService, userService);
|
||||
const controller = new MeController({
|
||||
logger,
|
||||
externalHooks,
|
||||
internalHooks,
|
||||
});
|
||||
const controller = new MeController(logger, externalHooks, internalHooks, userService);
|
||||
|
||||
describe('updateCurrentUser', () => {
|
||||
it('should throw BadRequestError if email is missing in the payload', async () => {
|
||||
|
||||
Reference in New Issue
Block a user