diff --git a/cmd/server/tests/tags_filter_test.go b/cmd/server/tests/tags_filter_test.go index a5c5c63..fef928e 100644 --- a/cmd/server/tests/tags_filter_test.go +++ b/cmd/server/tests/tags_filter_test.go @@ -110,9 +110,11 @@ func TestTagsFilter(t *testing.T) { assert.Equal(t, http.StatusOK, rec.Code, "Should return autocomplete results") - var results []map[string]interface{} - err := json.Unmarshal(rec.Body.Bytes(), &results) + var response map[string]interface{} + err := json.Unmarshal(rec.Body.Bytes(), &response) require.NoError(t, err) + + results := response["results"].([]map[string]interface{}) assert.Greater(t, len(results), 0, "Should return 'Science Fiction' in autocomplete results") })