mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-27 03:58:02 -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(201);
|
||||||
expect(response.body.metadata?.id).toBeDefined();
|
expect(response.body.metadata?.id).toBeDefined();
|
||||||
expect(
|
expect(
|
||||||
notesService.getNoteByIdOrAlias(response.body.metadata.id).content,
|
(await notesService.getNoteDtoByIdOrAlias(response.body.metadata.id))
|
||||||
|
.content,
|
||||||
).toEqual(newNote);
|
).toEqual(newNote);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -49,7 +50,8 @@ describe('Notes', () => {
|
||||||
.expect(201);
|
.expect(201);
|
||||||
expect(response.body.metadata?.id).toBeDefined();
|
expect(response.body.metadata?.id).toBeDefined();
|
||||||
return expect(
|
return expect(
|
||||||
notesService.getNoteByIdOrAlias(response.body.metadata.id).content,
|
(await notesService.getNoteDtoByIdOrAlias(response.body.metadata.id))
|
||||||
|
.content,
|
||||||
).toEqual(newNote);
|
).toEqual(newNote);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -67,9 +69,9 @@ describe('Notes', () => {
|
||||||
.put('/notes/test4')
|
.put('/notes/test4')
|
||||||
.send('New note text')
|
.send('New note text')
|
||||||
.expect(200);
|
.expect(200);
|
||||||
return expect(notesService.getNoteByIdOrAlias('test4').content).toEqual(
|
return expect(
|
||||||
'New note text',
|
(await notesService.getNoteDtoByIdOrAlias('test4')).content,
|
||||||
);
|
).toEqual('New note text');
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip(`PUT /notes/{note}/metadata`, () => {
|
it.skip(`PUT /notes/{note}/metadata`, () => {
|
||||||
|
|
Loading…
Reference in a new issue