fix(test): mock db in admin-alerts suite for push hook

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-08-01 15:58:17 +02:00
1 parent 811cf5719b
commit d69e3f5da5
1 file changed
+6
+6
View File
@@ -9,6 +9,12 @@ vi.mock("@/lib/admin/guard", () => ({ requirePermission: vi.fn() }));
vi.mock("@/lib/permissions", () => ({
PERMS: { NOTIFICATIONS_EDIT: "notifications.edit" },
}));
vi.mock("@/lib/db", () => ({
db: {
insert: vi.fn(() => ({ values: vi.fn().mockResolvedValue([]) })),
},
AlertLogs: {},
}));
vi.mock("@/lib/services/rcon", () => ({ rcon: { send: vi.fn() } }));
vi.mock("next/cache", () => ({ revalidatePath: vi.fn() }));