(t *testing.T)
| 175 | } |
| 176 | |
| 177 | func TestSearch_MultipleResults(t *testing.T) { |
| 178 | resetSearchFlags() |
| 179 | |
| 180 | tasks := []*model.Task{ |
| 181 | {ID: "001", Title: "Add authentication", Status: model.StatusPending, Priority: model.PriorityHigh, Body: "JWT auth"}, |
| 182 | {ID: "002", Title: "Deploy service", Status: model.StatusInProgress, Priority: model.PriorityMedium, Body: "Deploy the authentication service"}, |
| 183 | {ID: "003", Title: "Write docs", Status: model.StatusCompleted, Priority: model.PriorityLow, Body: "No match here"}, |
| 184 | } |
| 185 | |
| 186 | results := search.Search(tasks, "authentication") |
| 187 | |
| 188 | if len(results) != 2 { |
| 189 | t.Fatalf("expected 2 results, got %d", len(results)) |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | func TestSearch_MatchInTitleAndBody(t *testing.T) { |
| 194 | resetSearchFlags() |
nothing calls this directly
no test coverage detected