From 40e8acb6bbd3ba85d7a9247129d0ff2f75d3eeb5 Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Sun, 21 Nov 2021 18:03:29 +0100 Subject: [PATCH] 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 --- test/private-api/notes.e2e-spec.ts | 2 +- test/public-api/notes.e2e-spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/private-api/notes.e2e-spec.ts b/test/private-api/notes.e2e-spec.ts index 5e800e89d..efa5f5eb3 100644 --- a/test/private-api/notes.e2e-spec.ts +++ b/test/private-api/notes.e2e-spec.ts @@ -349,7 +349,7 @@ describe('Notes', () => { await agent .get(`/api/private/notes/${alias}/media/`) .expect('Content-Type', /json/) - .expect(401); + .expect(403); }); }); diff --git a/test/public-api/notes.e2e-spec.ts b/test/public-api/notes.e2e-spec.ts index 971af9913..3c608e302 100644 --- a/test/public-api/notes.e2e-spec.ts +++ b/test/public-api/notes.e2e-spec.ts @@ -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); }); });