Pulse/internal/notifications
rcourtman 301338d800 test: Add sendResolvedEmail tests for notifications package
Add comprehensive tests for the sendResolvedEmail function covering:
- Empty alert list (returns error)
- Nil alert list (returns error)
- All nil alerts (returns error from content builder)
- Single alert (exercises email sending path)
- Multiple alerts (tests grouped notification)
- Mixed nil and valid alerts (filters correctly)
- Zero resolved time (handles gracefully)

Also improves buildResolvedNotificationContent coverage as a collateral
benefit since sendResolvedEmail calls it internally.

Coverage: sendResolvedEmail 0% → 100%
Coverage: buildResolvedNotificationContent → 100%
Coverage: notifications package 58.3% → 58.6%
2025-12-02 13:14:22 +00:00
..
concurrency_test.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
email_enhanced.go Fix critical monitoring system issues and add robustness improvements 2025-11-07 08:52:37 +00:00
email_enhanced_test.go test: Add unit tests for email_enhanced.go error handling 2025-12-01 11:46:44 +00:00
email_providers.go chore: remove more dead code 2025-11-27 00:10:55 +00:00
email_template.go refactor: replace deprecated strings.Title with custom titleCase 2025-11-27 09:22:52 +00:00
email_template_test.go test: Add critical-only grouped alert template case 2025-12-02 00:40:02 +00:00
notification_utils_test.go test: Add tests for notification config copy functions 2025-12-01 13:43:52 +00:00
notifications.go style: fix additional staticcheck warnings 2025-11-27 09:21:11 +00:00
notifications_test.go test: Add sendResolvedEmail tests for notifications package 2025-12-02 13:14:22 +00:00
queue.go fix: Deadlock in CancelByAlertIDs and add tests 2025-12-02 10:40:07 +00:00
queue_test.go test: Add performCleanup tests for notifications queue 2025-12-02 12:16:55 +00:00
security_utils_test.go test: Add edge case for extractTelegramChatID URL parse error 2025-12-02 00:31:50 +00:00
templates_test.go Add unit tests for notification template functions (notifications) 2025-11-30 07:48:53 +00:00
webhook_allowlist_test.go test: Add DNS resolution failure test for ValidateWebhookURL 2025-12-02 01:09:03 +00:00
webhook_client_test.go test: Add secure webhook client tests for redirect handling 2025-12-02 10:26:34 +00:00
webhook_enhanced.go Improve table column widths and sparkline visibility 2025-11-09 23:36:52 +00:00
webhook_retry_test.go Add unit tests for isRetryableWebhookError (internal/notifications) 2025-11-30 22:03:26 +00:00
webhook_templates.go Fix Pushover webhook custom field overrides (related to #665) 2025-11-08 10:32:27 +00:00