## 概要 [Task2804: API作成(バージョン更新API)](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2804) 同意済み利用規約バージョン更新APIを実装しました。 ## レビューポイント なし ## UIの変更 なし ## 動作確認状況 UT,ローカルで動作確認済み ## 補足 なし
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
import { Test, TestingModule } from '@nestjs/testing';
|
|
import { UsersController } from './users.controller';
|
|
import { UsersService } from './users.service';
|
|
import { ConfigModule } from '@nestjs/config';
|
|
import { AuthService } from '../auth/auth.service';
|
|
|
|
describe('UsersController', () => {
|
|
let controller: UsersController;
|
|
const mockUserService = {};
|
|
const mockAuthService = {};
|
|
|
|
beforeEach(async () => {
|
|
const module: TestingModule = await Test.createTestingModule({
|
|
imports: [
|
|
ConfigModule.forRoot({
|
|
envFilePath: ['.env.local', '.env'],
|
|
isGlobal: true,
|
|
}),
|
|
],
|
|
controllers: [UsersController],
|
|
providers: [UsersService, AuthService],
|
|
})
|
|
.overrideProvider(UsersService)
|
|
.useValue(mockUserService)
|
|
.overrideProvider(AuthService)
|
|
.useValue(mockAuthService)
|
|
.compile();
|
|
|
|
controller = module.get<UsersController>(UsersController);
|
|
});
|
|
|
|
it('should be defined', () => {
|
|
expect(controller).toBeDefined();
|
|
});
|
|
});
|