add opt out flag for recent checks

This commit is contained in:
Alex Holliday committed 2026-08-04 15:30:34 -07:00
1 parent 5fa74bd883
commit 303f47a117
7 files changed
+22 -14

No files matched your search

@@ -123,7 +123,7 @@ describe("MaintenanceWindowService", () => {
await service.createMaintenanceWindow(defaultCreateParams);
expect(monitorsRepository.findByIds).toHaveBeenCalledWith(["mon-1", "mon-2"]);
expect(monitorsRepository.findByIds).toHaveBeenCalledWith(["mon-1", "mon-2"], { includeRecentChecks: false });
});
it("throws 403 when a monitor belongs to a different team", async () => {
@@ -404,7 +404,7 @@ describe("MaintenanceWindowService", () => {
body: { monitors: ["mon-1", "mon-2"] },
});
expect(monitorsRepository.findByIds).toHaveBeenCalledWith(["mon-1", "mon-2"]);
expect(monitorsRepository.findByIds).toHaveBeenCalledWith(["mon-1", "mon-2"], { includeRecentChecks: false });
});
it("throws 403 when a new monitor belongs to a different team", async () => {
@@ -472,7 +472,7 @@ describe("UserService", () => {
await service.deleteUser({ userId: "user-1", teamId: "team-1", roles: ["superadmin"] });
expect(monitorsRepository.findByTeamId).toHaveBeenCalledWith("team-1", {});
expect(monitorsRepository.findByTeamId).toHaveBeenCalledWith("team-1", {}, { includeRecentChecks: false });
expect(scheduler.deleteJob).toHaveBeenCalledTimes(2);
expect(usersRepository.deleteById).toHaveBeenCalledWith("user-1");
});