test: Add UpdateStatus not found test for notifications package

This commit is contained in:
rcourtman 2025-12-02 14:26:17 +00:00
parent 3f8455dfa9
commit 3d9c4f6da1

View file

@ -652,6 +652,20 @@ func TestGetQueueStats(t *testing.T) {
t.Errorf("failed count = %d, want 1", stats["failed"])
}
})
t.Run("UpdateStatus returns error for non-existent notification", func(t *testing.T) {
tempDir := t.TempDir()
nq, err := NewNotificationQueue(tempDir)
if err != nil {
t.Fatalf("Failed to create notification queue: %v", err)
}
defer nq.Stop()
err = nq.UpdateStatus("non-existent-id", QueueStatusSent, "")
if err == nil {
t.Error("expected error when updating non-existent notification, got nil")
}
})
}
func TestPerformCleanup(t *testing.T) {