updated tests

This commit is contained in:
jackiettran
2026-01-15 18:47:43 -05:00
parent 35d5050286
commit 63385e049c
13 changed files with 256 additions and 201 deletions

View File

@@ -23,6 +23,8 @@ jest.mock("../../../middleware/auth", () => ({
};
next();
}),
optionalAuth: jest.fn((req, res, next) => next()),
requireAdmin: jest.fn((req, res, next) => next()),
}));
jest.mock("../../../services/UserService", () => ({
@@ -365,7 +367,7 @@ describe("Users Routes", () => {
expect(response.status).toBe(200);
expect(response.body).toEqual(mockUser);
expect(mockUserFindByPk).toHaveBeenCalledWith("2", {
attributes: { exclude: ["password", "email", "phone", "address"] },
attributes: { exclude: ["password", "email", "phone", "address", "verificationToken", "passwordResetToken", "isBanned", "bannedAt", "bannedBy", "banReason"] },
});
});