test: fix note e2e test 'fails, when user can't read note'

Because the rejection now happens automatically in the permissions guard it now returns a 403 instead of 401

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-11-21 18:03:29 +01:00 committed by David Mehren
parent 3e4abb561d
commit 988909eb0b
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
2 changed files with 2 additions and 2 deletions

View file

@ -349,7 +349,7 @@ describe('Notes', () => {
await agent
.get(`/api/private/notes/${alias}/media/`)
.expect('Content-Type', /json/)
.expect(401);
.expect(403);
});
});

View file

@ -464,7 +464,7 @@ describe('Notes', () => {
await request(testSetup.app.getHttpServer())
.get(`/api/v2/notes/${alias}/media/`)
.expect('Content-Type', /json/)
.expect(401);
.expect(403);
});
});