admin
e630ff744a
test(01-02): add AlertEventModel unit tests
- Tests cover create (valid, default status active, explicit status, with details JSONB)
- Input validation (empty name, invalid alert_type, invalid status)
- Supabase error handling (throws descriptive message)
- findActive (all active, filtered by service, empty array)
- acknowledge (sets status+timestamp, throws on not found via PGRST116)
- resolve (sets status+timestamp, throws on not found)
- findRecentByService (found within window, null when absent — deduplication use case)
- deleteOlderThan (cutoff date, returns count)
- All 41 tests pass (14 HealthCheck + 19 AlertEvent + 8 existing)
2026-02-24 12:22:12 -05:00
..
2025-11-10 02:43:47 -05:00
2026-02-23 22:28:45 -05:00
2026-02-24 12:22:12 -05:00
2026-02-23 14:45:57 -05:00
2025-07-31 16:18:53 -04:00
2026-02-23 13:41:00 -05:00
2025-11-09 21:07:22 -05:00
2026-02-23 14:45:57 -05:00
2025-07-27 13:29:26 -04:00
2025-07-28 19:46:46 -04:00
2025-07-30 22:02:17 -04:00
2025-07-31 09:55:14 -04:00
2025-07-30 22:02:17 -04:00
2025-07-31 09:55:14 -04:00
2026-02-24 11:41:00 -05:00
2025-07-27 20:25:46 -04:00
2025-07-31 16:18:53 -04:00
2026-02-24 11:41:00 -05:00
2026-02-24 11:41:00 -05:00
2025-07-31 09:55:14 -04:00
2025-08-01 17:51:45 -04:00
2025-08-01 17:51:45 -04:00
2025-07-31 09:55:14 -04:00
2025-08-01 14:57:56 -04:00
2025-08-01 17:51:45 -04:00
2025-11-09 21:07:22 -05:00
2025-11-06 20:58:26 -05:00
2026-02-24 11:41:00 -05:00
2025-08-01 17:51:45 -04:00
2025-11-09 21:07:22 -05:00