mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-01-02 16:01:55 +00:00
MeController: Add missing mock repositories for testing
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
91200cb3b3
commit
35051986be
1 changed files with 9 additions and 0 deletions
|
@ -1,8 +1,11 @@
|
|||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { getRepositoryToken } from '@nestjs/typeorm';
|
||||
import { HistoryModule } from '../../../history/history.module';
|
||||
import { AuthorColor } from '../../../notes/author-color.entity';
|
||||
import { Note } from '../../../notes/note.entity';
|
||||
import { NotesModule } from '../../../notes/notes.module';
|
||||
import { AuthToken } from '../../../users/auth-token.entity';
|
||||
import { Identity } from '../../../users/identity.entity';
|
||||
import { User } from '../../../users/user.entity';
|
||||
import { UsersModule } from '../../../users/users.module';
|
||||
import { MeController } from './me.controller';
|
||||
|
@ -19,6 +22,12 @@ describe('Me Controller', () => {
|
|||
.useValue({})
|
||||
.overrideProvider(getRepositoryToken(Note))
|
||||
.useValue({})
|
||||
.overrideProvider(getRepositoryToken(AuthToken))
|
||||
.useValue({})
|
||||
.overrideProvider(getRepositoryToken(Identity))
|
||||
.useValue({})
|
||||
.overrideProvider(getRepositoryToken(AuthorColor))
|
||||
.useValue({})
|
||||
.compile();
|
||||
|
||||
controller = module.get<MeController>(MeController);
|
||||
|
|
Loading…
Reference in a new issue