mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-23 03:27:05 -04:00
NotesService: updateNoteByIdOrAlias
should return the new note
Fixes #702 Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
4a1bec8eec
commit
6301a264dd
2 changed files with 4 additions and 2 deletions
|
@ -103,7 +103,7 @@ describe('Notes', () => {
|
|||
|
||||
it(`PUT /notes/{note}`, async () => {
|
||||
await notesService.createNote('This is a test note.', 'test4');
|
||||
await request(app.getHttpServer())
|
||||
const response = await request(app.getHttpServer())
|
||||
.put('/notes/test4')
|
||||
.set('Content-Type', 'text/markdown')
|
||||
.send('New note text')
|
||||
|
@ -111,6 +111,7 @@ describe('Notes', () => {
|
|||
await expect(
|
||||
(await notesService.getNoteDtoByIdOrAlias('test4')).content,
|
||||
).toEqual('New note text');
|
||||
expect(response.body.content).toEqual('New note text');
|
||||
|
||||
// check if a missing note correctly returns 404
|
||||
await request(app.getHttpServer())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue