mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-01-27 10:12:57 +00:00
Add permissions service to test-setup
Signed-off-by: Yannick Bungers <git@innay.de>
This commit is contained in:
parent
4dd2762be2
commit
e1e3138561
1 changed files with 4 additions and 0 deletions
|
@ -45,6 +45,7 @@ import { Note } from '../src/notes/note.entity';
|
||||||
import { NotesModule } from '../src/notes/notes.module';
|
import { NotesModule } from '../src/notes/notes.module';
|
||||||
import { NotesService } from '../src/notes/notes.service';
|
import { NotesService } from '../src/notes/notes.service';
|
||||||
import { PermissionsModule } from '../src/permissions/permissions.module';
|
import { PermissionsModule } from '../src/permissions/permissions.module';
|
||||||
|
import { PermissionsService } from '../src/permissions/permissions.service';
|
||||||
import { RevisionsModule } from '../src/revisions/revisions.module';
|
import { RevisionsModule } from '../src/revisions/revisions.module';
|
||||||
import { User } from '../src/users/user.entity';
|
import { User } from '../src/users/user.entity';
|
||||||
import { UsersModule } from '../src/users/users.module';
|
import { UsersModule } from '../src/users/users.module';
|
||||||
|
@ -70,6 +71,7 @@ export class TestSetup {
|
||||||
authTokens: AuthTokenWithSecretDto[] = [];
|
authTokens: AuthTokenWithSecretDto[] = [];
|
||||||
anonymousNotes: Note[] = [];
|
anonymousNotes: Note[] = [];
|
||||||
ownedNotes: Note[] = [];
|
ownedNotes: Note[] = [];
|
||||||
|
permissionsService: PermissionsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cleans up remnants from a test run from the database
|
* Cleans up remnants from a test run from the database
|
||||||
|
@ -264,6 +266,8 @@ export class TestSetupBuilder {
|
||||||
this.testSetup.moduleRef.get<AliasService>(AliasService);
|
this.testSetup.moduleRef.get<AliasService>(AliasService);
|
||||||
this.testSetup.authService =
|
this.testSetup.authService =
|
||||||
this.testSetup.moduleRef.get<AuthService>(AuthService);
|
this.testSetup.moduleRef.get<AuthService>(AuthService);
|
||||||
|
this.testSetup.permissionsService =
|
||||||
|
this.testSetup.moduleRef.get<PermissionsService>(PermissionsService);
|
||||||
|
|
||||||
this.testSetup.app = this.testSetup.moduleRef.createNestApplication();
|
this.testSetup.app = this.testSetup.moduleRef.createNestApplication();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue