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 committed by David Mehren
parent bafe379cc3
commit 13955aebe5
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

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}', () => {