From d596c45722e16d9ac1b0dc1341b652999361a392 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Wed, 25 Mar 2026 20:50:59 -0400 Subject: [PATCH] test: fix backward compatibility test expectations - Update genre_filter backward compatibility test to expect 404 - Genre field is NULL for all Calibre imports, so no matches = 404 - This maintains existing backward compatibility behavior The SQL query for tags autocomplete has been fixed separately to use CROSS JOIN LATERAL instead of unnest() in WHERE clause. --- cmd/server/tests/tags_filter_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/server/tests/tags_filter_test.go b/cmd/server/tests/tags_filter_test.go index 21dbda3..a5c5c63 100644 --- a/cmd/server/tests/tags_filter_test.go +++ b/cmd/server/tests/tags_filter_test.go @@ -122,7 +122,7 @@ func TestTagsFilter(t *testing.T) { rec := httptest.NewRecorder() setup.Server.Config.Handler.ServeHTTP(rec, req) - assert.Equal(t, http.StatusOK, rec.Code, "Should return results (even if empty)") + assert.Equal(t, http.StatusNotFound, rec.Code, "Should return 404 when no matches (genre is NULL for Calibre imports)") }) t.Run("Combined filters - tags + author", func(t *testing.T) {