Merge pull request #1047 from hedgedoc/docs/apidocs

This commit is contained in:
David Mehren 2021-03-21 19:07:14 +01:00 committed by GitHub
commit 6d8780de4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 307 additions and 14 deletions

View file

@ -104,7 +104,7 @@ describe('Notes', () => {
const filename = url.split('/').pop();
await request(app.getHttpServer())
.delete('/media/' + filename)
.expect(200);
.expect(204);
});
afterAll(async () => {

View file

@ -146,7 +146,7 @@ describe('Notes', () => {
describe('DELETE /notes/{note}', () => {
it('works with an existing alias', async () => {
await notesService.createNote(content, 'test3', user);
await request(app.getHttpServer()).delete('/notes/test3').expect(200);
await request(app.getHttpServer()).delete('/notes/test3').expect(204);
await expect(notesService.getNoteByIdOrAlias('test3')).rejects.toEqual(
new NotInDBError("Note with id/alias 'test3' not found."),
);