mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 10:16:32 -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
a2a9ad224f
commit
eb4278dd73
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