From 80d423663be2ed3a3594bfacc3d611d6f4d9743d Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Wed, 25 Mar 2026 21:01:21 -0400 Subject: [PATCH] test: fix type assertion in autocomplete test - Change type assertion from []map[string]interface{} to []interface{} - JSON unmarshal into interface{} creates []interface{}, not typed slices - Fixes panic: interface conversion error in test The response["results"] field needs to be asserted as []interface{} when the parent is unmarshaled into map[string]interface{}. This matches Go's JSON unmarshaling behavior for interface{} types. --- 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 fef928e..784d5f1 100644 --- a/cmd/server/tests/tags_filter_test.go +++ b/cmd/server/tests/tags_filter_test.go @@ -114,7 +114,7 @@ func TestTagsFilter(t *testing.T) { err := json.Unmarshal(rec.Body.Bytes(), &response) require.NoError(t, err) - results := response["results"].([]map[string]interface{}) + results := response["results"].([]interface{}) assert.Greater(t, len(results), 0, "Should return 'Science Fiction' in autocomplete results") })