Merge pull request #709 from hedgedoc/fix/api-notes-metadata

This commit is contained in:
Yannick Bungers 2021-01-15 22:47:52 +01:00 committed by GitHub
commit 0d95c29df2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 3 deletions

View file

@ -109,7 +109,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')
@ -117,6 +117,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())