From b9b8bbe871ea4f65382cb15f2087ef5d41005638 Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Fri, 25 Oct 2024 23:44:55 -0400 Subject: [PATCH] fix: unit test failure --- api/src/unraid-api/auth/auth.service.spec.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/api/src/unraid-api/auth/auth.service.spec.ts b/api/src/unraid-api/auth/auth.service.spec.ts index c7550e2ac..811cbbf82 100644 --- a/api/src/unraid-api/auth/auth.service.spec.ts +++ b/api/src/unraid-api/auth/auth.service.spec.ts @@ -1,12 +1,19 @@ import { Test, type TestingModule } from '@nestjs/testing'; import { AuthService } from './auth.service'; +import { UsersService } from '@app/unraid-api/auth/users.service'; +import { CookieService } from '@app/unraid-api/auth/cookie.service'; describe('AuthService', () => { let service: AuthService; beforeEach(async () => { const module: TestingModule = await Test.createTestingModule({ - providers: [AuthService], + providers: [ + AuthService, + { provide: 'USERS_SERVICE', useClass: UsersService }, + { provide: 'COOKIE_SERVICE', useClass: CookieService }, + { provide: 'SESSION_COOKIE_CONFIG', useValue: { name: 'session' } }, + ], }).compile(); service = module.get(AuthService);