From 0a0b7f4d2ef3555ab42ff6b6769d5dda53b455a5 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Sun, 1 Mar 2026 00:33:20 -0500 Subject: [PATCH] fix: Update test files to match refactored method signatures Update test files to work with recent backend refactoring changes. Test changes in internal/services/dashboard_service_test.go: - Fix method name casing for FilterHiddenCollections - Change from filterHiddenCollections (lowercase 'f') - Change to FilterHiddenCollections (uppercase 'F') - Matches exported method signature in DashboardService - Line 57: Update test call to use correct exported method Test changes in internal/handlers/dashboard_test.go: - Update getViewAllURL test to match simplified function signature - Remove queryType parameter from test call - Function now only takes collectionName parameter - Aligns with refactoring to use /collections/{id} routing - Line 178: Update test call to use new signature These fixes ensure tests compile and run correctly after the collection detail page refactoring where: 1. getViewAllURL() was simplified to return /collections/{id} 2. System collections now use the same routing as user collections --- internal/handlers/dashboard_test.go | 2 +- internal/services/dashboard_service_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/handlers/dashboard_test.go b/internal/handlers/dashboard_test.go index 41b47bf..65b6e69 100644 --- a/internal/handlers/dashboard_test.go +++ b/internal/handlers/dashboard_test.go @@ -175,7 +175,7 @@ func TestGetViewAllURL_SystemCollections(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - result := getViewAllURL(tt.collectionName, tt.queryType) + result := getViewAllURL(tt.collectionName) assert.Equal(t, tt.expected, result, "getViewAllURL mismatch") }) } diff --git a/internal/services/dashboard_service_test.go b/internal/services/dashboard_service_test.go index a0254f3..163340a 100644 --- a/internal/services/dashboard_service_test.go +++ b/internal/services/dashboard_service_test.go @@ -54,7 +54,7 @@ func TestDashboardService_FilterHiddenCollections(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - result := service.filterHiddenCollections(sections, tt.hidden) + result := service.FilterHiddenCollections(sections, tt.hidden) assert.Equal(t, tt.expectedCount, len(result), "expected %d sections", tt.expectedCount)