diff --git a/backend/src/toeic/toeic.controller.spec.ts b/backend/src/toeic/toeic.controller.spec.ts index 816f3e0..cea9f46 100644 --- a/backend/src/toeic/toeic.controller.spec.ts +++ b/backend/src/toeic/toeic.controller.spec.ts @@ -11,10 +11,7 @@ describe('ToeicController', () => { beforeEach(async () => { const module: TestingModule = await Test.createTestingModule({ controllers: [ToeicController], - providers: [ - ToeicService, - { provide: ToeicService, useClass: MockToeicService }, - ], + providers: [{ provide: ToeicService, useClass: MockToeicService }], }).compile(); toeicService = module.get(ToeicService); diff --git a/backend/src/toeic/toeic.controller.ts b/backend/src/toeic/toeic.controller.ts index 1d99c29..cf7e21c 100644 --- a/backend/src/toeic/toeic.controller.ts +++ b/backend/src/toeic/toeic.controller.ts @@ -1,6 +1,6 @@ import { Controller, Get, Param } from '@nestjs/common'; import { ToeicService } from './toeic.service'; -import { ApiSwagger } from 'src/common/swagger/api.decorator'; +import { ApiSwagger } from '../common/swagger/api.decorator'; @Controller('toeic') export class ToeicController { diff --git a/backend/src/toeic/toeic.service.spec.ts b/backend/src/toeic/toeic.service.spec.ts index 07eb7fc..7291f70 100644 --- a/backend/src/toeic/toeic.service.spec.ts +++ b/backend/src/toeic/toeic.service.spec.ts @@ -1,27 +1,27 @@ import { Test, TestingModule } from '@nestjs/testing'; import { ToeicService } from './toeic.service'; -import { SupabaseService } from '../supabase/supabase.service'; +import { PrismaService } from '../prisma/prisma.service'; -class MockSupabaseService {} +class MockPrisma {} describe('ToeicService', () => { let service: ToeicService; - let supabaseService: SupabaseService; + let prisma: PrismaService; beforeEach(async () => { const module: TestingModule = await Test.createTestingModule({ providers: [ ToeicService, - { provide: SupabaseService, useClass: MockSupabaseService }, + { provide: PrismaService, useClass: MockPrisma }, ], }).compile(); service = module.get(ToeicService); - supabaseService = module.get(SupabaseService); + prisma = module.get(PrismaService); }); it('should be defined', () => { expect(service).toBeDefined(); - expect(supabaseService).toBeDefined(); + expect(prisma).toBeDefined(); }); }); diff --git a/backend/src/upload/upload.controller.spec.ts b/backend/src/upload/upload.controller.spec.ts index 387a4a2..2a962b3 100644 --- a/backend/src/upload/upload.controller.spec.ts +++ b/backend/src/upload/upload.controller.spec.ts @@ -2,12 +2,15 @@ import { Test, TestingModule } from '@nestjs/testing'; import { UploadController } from './upload.controller'; import { UploadService } from './upload.service'; import { ToeicService } from '../toeic/toeic.service'; +import { AuthService } from '../auth/auth.service'; class MockToeicService {} +class MockAuthService {} -describe('PdfUploaderController', () => { +describe('UploaderController', () => { let controller: UploadController; let toeicService: ToeicService; + let authService: AuthService; beforeEach(async () => { const module: TestingModule = await Test.createTestingModule({ @@ -15,15 +18,18 @@ describe('PdfUploaderController', () => { providers: [ UploadService, { provide: ToeicService, useClass: MockToeicService }, + { provide: AuthService, useClass: MockAuthService }, ], }).compile(); toeicService = module.get(ToeicService); + authService = module.get(AuthService); controller = module.get(UploadController); }); it('should be defined', () => { expect(controller).toBeDefined(); + expect(authService).toBeDefined(); expect(toeicService).toBeDefined(); }); });