Skip to content

Commit e3add8d

Browse files
test(auth): fix test
1 parent 4cd7932 commit e3add8d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/plugins/auth.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ await suite("auth plugin", async () => {
4141
Authorization: "[invalid authorization header]",
4242
},
4343
});
44-
// Unauthorized
45-
assert.equal(response.statusCode, 401);
44+
// Bad Request
45+
assert.equal(response.statusCode, 400);
4646
});
4747
await test("invalid authorization scheme", async () => {
4848
const response = await fastify.inject({
@@ -52,8 +52,8 @@ await suite("auth plugin", async () => {
5252
Authorization: "Basic INVALID",
5353
},
5454
});
55-
// Unauthorized
56-
assert.equal(response.statusCode, 401);
55+
// Bad Request
56+
assert.equal(response.statusCode, 400);
5757
});
5858
await test("invalid token", async () => {
5959
const response = await fastify.inject({

0 commit comments

Comments
 (0)