From b2461088e81d0d6408ddfdd4115b45460032086d Mon Sep 17 00:00:00 2001 From: tdurieux Date: Wed, 6 May 2026 16:55:50 +0300 Subject: [PATCH] fix test --- test/route-utils-auth.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/route-utils-auth.test.js b/test/route-utils-auth.test.js index 67c62cf..0994246 100644 --- a/test/route-utils-auth.test.js +++ b/test/route-utils-auth.test.js @@ -133,7 +133,7 @@ describe("route-utils.isOwnerCoauthorOrAdmin", function () { expect(() => isOwnerCoauthorOrAdmin(repo, user)).to.not.throw(); }); - it("throws not_authorized with httpStatus 401 for an unrelated user", function () { + it("throws not_authorized with httpStatus 403 for an unrelated user", function () { const user = makeUser({ username: "stranger" }); const repo = makeRepo({ coauthors: [{ username: "alice" }] }); let caught; @@ -144,6 +144,6 @@ describe("route-utils.isOwnerCoauthorOrAdmin", function () { } expect(caught).to.be.instanceOf(AnonymousError); expect(caught.message).to.equal("not_authorized"); - expect(caught.httpStatus).to.equal(401); + expect(caught.httpStatus).to.equal(403); }); });