diff --git a/test/public-api/notes.e2e-spec.ts b/test/public-api/notes.e2e-spec.ts index 61abb79eb..0fb44fab5 100644 --- a/test/public-api/notes.e2e-spec.ts +++ b/test/public-api/notes.e2e-spec.ts @@ -113,6 +113,13 @@ describe('Notes', () => { .expect('Content-Type', /json/) .expect(404); }); + it('fails with a forbidden note id', async () => { + // check if a forbidden note correctly returns 400 + await request(app.getHttpServer()) + .get('/notes/forbiddenNoteId') + .expect('Content-Type', /json/) + .expect(400); + }); }); describe('POST /notes/{note}', () => {