mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-23 19:23:24 +00:00
Public API: Test that forbidden notes can't be accessed
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
470f09d8fe
commit
e65c19ddd8
1 changed files with 7 additions and 0 deletions
|
@ -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}', () => {
|
||||
|
|
Loading…
Reference in a new issue