updated tests
This commit is contained in:
@@ -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"] },
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user