test: fix e2e tests to handle the new aliases

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-06-06 17:55:41 +02:00 committed by David Mehren
parent 90b64c73b3
commit 56eaddff8c
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
6 changed files with 465 additions and 24 deletions

View file

@ -45,6 +45,7 @@ describe('Me', () => {
let user: User;
let content: string;
let note1: Note;
let alias2: string;
let note2: Note;
beforeAll(async () => {
@ -88,8 +89,9 @@ describe('Me', () => {
user = await userService.createUser('hardcoded', 'Testy');
const notesService = moduleRef.get(NotesService);
content = 'This is a test note.';
note1 = await notesService.createNote(content, null, user);
note2 = await notesService.createNote(content, 'note2', user);
alias2 = 'note2';
note1 = await notesService.createNote(content, undefined, user);
note2 = await notesService.createNote(content, alias2, user);
});
it('GET /me', async () => {