Adjust tests to new Session and Author entities

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-05-17 22:28:35 +02:00
parent 3d07c5e443
commit f6d430c23f
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
15 changed files with 91 additions and 1 deletions

View file

@ -5,6 +5,7 @@
*/
import { Test, TestingModule } from '@nestjs/testing';
import { Session } from '../users/session.entity';
import { AuthService } from './auth.service';
import { PassportModule } from '@nestjs/passport';
import { getRepositoryToken } from '@nestjs/typeorm';
@ -49,6 +50,8 @@ describe('AuthService', () => {
.useValue({})
.overrideProvider(getRepositoryToken(User))
.useClass(Repository)
.overrideProvider(getRepositoryToken(Session))
.useValue({})
.compile();
service = module.get<AuthService>(AuthService);