Skip to content

Commit

Permalink
Remove logging from role route validation test
Browse files Browse the repository at this point in the history
  • Loading branch information
lemilonkh committed Mar 11, 2024
1 parent 0a51f31 commit 8a2182c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/tests/api/admin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ describe("Admin API", () => {

it("should validate the request", async () => {
Auth.getServerSession = mock.fn(() => Promise.resolve(mockAdminSession));

const req = mockRequest({ email: testUserData.email, role: "invalid" });
const res = await changeRole(req, { params: {} });
assert.equal(res.status, 400);
console.log(await res.text());

const req2 = mockRequest({ email: "not-an-email", role: "Admin" });
const res2 = await changeRole(req2, { params: {} });
assert.equal(res2.status, 400);

const req3 = mockRequest({});
const res3 = await changeRole(req3, { params: {} });
assert.equal(res3.status, 400);
Expand Down

0 comments on commit 8a2182c

Please sign in to comment.