diff --git a/pkg/deesee/filter_test.go b/pkg/deesee/filter_test.go index 10987f6..9df500a 100644 --- a/pkg/deesee/filter_test.go +++ b/pkg/deesee/filter_test.go @@ -12,6 +12,7 @@ func TestFilterBySuperPowers(t *testing.T) { t.Errorf("Expected GetModuleRootPath to return module root path, got error: %v", err) return } + persons, err := Load(rootPath + "/data/heros.json") if err != nil { t.Errorf("Expected Load to return persons, got error: %v", err) @@ -27,6 +28,7 @@ func TestFilterBySuperPowers(t *testing.T) { if len(SearchByPowers(persons, []string{"healing"})) < 1 { t.Errorf("Expected at least one person with healing superpower, got none") } + // Test with valid and invalid if len(SearchByPowers(persons, []string{"healing", "slowpoking"})) < 1 { t.Errorf("Expected at least one person with healing superpower, got none")