NotesE2ETests: Ensure posting the same note alias twice fails

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-02-20 16:10:30 +01:00
parent 93d859647d
commit 54286d589d

View file

@ -114,6 +114,15 @@ describe('Notes', () => {
),
).toEqual(content);
});
it('fails with a existing alias', async () => {
await request(app.getHttpServer())
.post('/notes/test2')
.set('Content-Type', 'text/markdown')
.send(content)
.expect('Content-Type', /json/)
.expect(400);
});
});
describe('DELETE /notes/{note}', () => {