(t *testing.T)
| 191 | } |
| 192 | |
| 193 | func TestSearch_MatchInTitleAndBody(t *testing.T) { |
| 194 | resetSearchFlags() |
| 195 | |
| 196 | tasks := []*model.Task{ |
| 197 | {ID: "001", Title: "Authentication system", Status: model.StatusPending, Priority: model.PriorityHigh, Body: "Implement authentication with JWT"}, |
| 198 | } |
| 199 | |
| 200 | results := search.Search(tasks, "authentication") |
| 201 | |
| 202 | if len(results) != 1 { |
| 203 | t.Fatalf("expected 1 result, got %d", len(results)) |
| 204 | } |
| 205 | if results[0].MatchLocation != "title,body" { |
| 206 | t.Errorf("expected match location 'title,body', got %s", results[0].MatchLocation) |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | func TestSearch_NoResults(t *testing.T) { |
| 211 | resetSearchFlags() |
nothing calls this directly
no test coverage detected