guard against empty pending notifications in resolved-conversation test

This commit is contained in:
Abhinav Raut
2026-08-20 01:20:28 +05:30
parent 16e3a7dbff
commit de3d5f7689
+3
View File
@@ -536,6 +536,9 @@ func TestSendNotificationSkipsResolvedConversation(t *testing.T) {
if err := m.q.GetScheduledSLANotifications.Select(&pending); err != nil {
t.Fatalf("fetching scheduled notifications: %v", err)
}
if len(pending) != 1 {
t.Fatalf("expected one due notification, got %d", len(pending))
}
if err := m.SendNotification(pending[0]); err != nil {
t.Fatalf("SendNotification: %v", err)
}