mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
[E2E tests] Don't use hardcoded service tokens
The DI tokens for services seem to have changed with NestJS 8. As we can also use the class object instead of a hardcoded token, this commit replaces the tokens accordingly. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
28a1628722
commit
a8d6b33139
2 changed files with 4 additions and 4 deletions
|
@ -71,9 +71,9 @@ describe('Media', () => {
|
||||||
const logger = await app.resolve(ConsoleLoggerService);
|
const logger = await app.resolve(ConsoleLoggerService);
|
||||||
logger.log('Switching logger', 'AppBootstrap');
|
logger.log('Switching logger', 'AppBootstrap');
|
||||||
app.useLogger(logger);
|
app.useLogger(logger);
|
||||||
const notesService: NotesService = moduleRef.get('NotesService');
|
const notesService: NotesService = moduleRef.get(NotesService);
|
||||||
await notesService.createNote('test content', 'test_upload_media');
|
await notesService.createNote('test content', 'test_upload_media');
|
||||||
const userService: UsersService = moduleRef.get('UsersService');
|
const userService: UsersService = moduleRef.get(UsersService);
|
||||||
await userService.createUser('hardcoded', 'Testy');
|
await userService.createUser('hardcoded', 'Testy');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -68,9 +68,9 @@ describe('Media', () => {
|
||||||
const logger = await app.resolve(ConsoleLoggerService);
|
const logger = await app.resolve(ConsoleLoggerService);
|
||||||
logger.log('Switching logger', 'AppBootstrap');
|
logger.log('Switching logger', 'AppBootstrap');
|
||||||
app.useLogger(logger);
|
app.useLogger(logger);
|
||||||
const notesService: NotesService = moduleRef.get('NotesService');
|
const notesService: NotesService = moduleRef.get(NotesService);
|
||||||
await notesService.createNote('test content', 'test_upload_media');
|
await notesService.createNote('test content', 'test_upload_media');
|
||||||
mediaService = moduleRef.get('MediaService');
|
mediaService = moduleRef.get(MediaService);
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('POST /media', () => {
|
describe('POST /media', () => {
|
||||||
|
|
Loading…
Reference in a new issue