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
parent d27c531d9a
commit 40e8acb6bb
2 changed files with 2 additions and 2 deletions

View file

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

View file

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