mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-10-27 06:47:01 +00:00
guard against empty pending notifications in resolved-conversation test
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user