FilesystemBackend: Use scoped appConfig

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-01-08 12:53:16 +01:00
parent 67c7c4b8d1
commit e8e82076d0
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
3 changed files with 29 additions and 18 deletions

View file

@ -5,10 +5,12 @@
*/
import { INestApplication } from '@nestjs/common';
import { ConfigModule, registerAs } from '@nestjs/config';
import { Test } from '@nestjs/testing';
import { TypeOrmModule } from '@nestjs/typeorm';
import * as request from 'supertest';
import { PublicApiModule } from '../../src/api/public/public-api.module';
import appConfigMock from '../../src/config/app.config.mock';
import { NotInDBError } from '../../src/errors/errors';
import { GroupsModule } from '../../src/groups/groups.module';
import { LoggerModule } from '../../src/logger/logger.module';
@ -23,6 +25,10 @@ describe('Notes', () => {
beforeAll(async () => {
const moduleRef = await Test.createTestingModule({
imports: [
ConfigModule.forRoot({
isGlobal: true,
load: [appConfigMock],
}),
PublicApiModule,
NotesModule,
PermissionsModule,