mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
Update Note E2E tests to use new getNoteDtoByIdOrAlias
method
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
5d1cc6c339
commit
8145fc48d1
1 changed files with 7 additions and 5 deletions
|
@ -27,7 +27,8 @@ describe('Notes', () => {
|
|||
.expect(201);
|
||||
expect(response.body.metadata?.id).toBeDefined();
|
||||
expect(
|
||||
notesService.getNoteByIdOrAlias(response.body.metadata.id).content,
|
||||
(await notesService.getNoteDtoByIdOrAlias(response.body.metadata.id))
|
||||
.content,
|
||||
).toEqual(newNote);
|
||||
});
|
||||
|
||||
|
@ -49,7 +50,8 @@ describe('Notes', () => {
|
|||
.expect(201);
|
||||
expect(response.body.metadata?.id).toBeDefined();
|
||||
return expect(
|
||||
notesService.getNoteByIdOrAlias(response.body.metadata.id).content,
|
||||
(await notesService.getNoteDtoByIdOrAlias(response.body.metadata.id))
|
||||
.content,
|
||||
).toEqual(newNote);
|
||||
});
|
||||
|
||||
|
@ -67,9 +69,9 @@ describe('Notes', () => {
|
|||
.put('/notes/test4')
|
||||
.send('New note text')
|
||||
.expect(200);
|
||||
return expect(notesService.getNoteByIdOrAlias('test4').content).toEqual(
|
||||
'New note text',
|
||||
);
|
||||
return expect(
|
||||
(await notesService.getNoteDtoByIdOrAlias('test4')).content,
|
||||
).toEqual('New note text');
|
||||
});
|
||||
|
||||
it.skip(`PUT /notes/{note}/metadata`, () => {
|
||||
|
|
Loading…
Reference in a new issue