mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 09:04:44 -04: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
ea2dfafbd0
commit
f667410b51
1 changed files with 7 additions and 0 deletions
|
@ -113,6 +113,13 @@ describe('Notes', () => {
|
||||||
.expect('Content-Type', /json/)
|
.expect('Content-Type', /json/)
|
||||||
.expect(404);
|
.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}', () => {
|
describe('POST /notes/{note}', () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue