Skip to content

Commit 2def18e

Browse files
committed
fix: refactor response handling in discord service authorization tests
1 parent e1273eb commit 2def18e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/unit/middlewares/authorizeBot.test.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ describe("Middleware | Authorize Bot", function () {
143143

144144
const response = {
145145
boom: {
146-
badRequest: boomBadRequestSpy,
147146
unauthorized: boomUnauthorizedSpy,
148147
},
149148
};
@@ -218,7 +217,7 @@ describe("Middleware | Authorize Bot", function () {
218217

219218
authorizeBot.verifyDiscordBot(request, response, nextSpy);
220219
expect(nextSpy.calledOnce).to.be.equal(false);
221-
expect(response.boom.unauthorized.calledOnce).to.be.equal(true);
220+
expect(boomUnauthorizedSpy.calledOnce).to.be.equal(true);
222221
});
223222

224223
it("should return unauthorized when token is valid but not for cloudflare worker", function () {

0 commit comments

Comments
 (0)