(t *testing.T)
| 158 | } |
| 159 | |
| 160 | func TestSearch_CaseInsensitive(t *testing.T) { |
| 161 | resetSearchFlags() |
| 162 | |
| 163 | tasks := []*model.Task{ |
| 164 | {ID: "001", Title: "AUTHENTICATION Module", Status: model.StatusPending, Priority: model.PriorityHigh}, |
| 165 | } |
| 166 | |
| 167 | results := search.Search(tasks, "authentication") |
| 168 | |
| 169 | if len(results) != 1 { |
| 170 | t.Fatalf("expected 1 result for case-insensitive match, got %d", len(results)) |
| 171 | } |
| 172 | if results[0].ID != "001" { |
| 173 | t.Errorf("expected task 001, got %s", results[0].ID) |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | func TestSearch_MultipleResults(t *testing.T) { |
| 178 | resetSearchFlags() |
nothing calls this directly
no test coverage detected