(t *testing.T)
| 5 | ) |
| 6 | |
| 7 | func TestMapExternalTask_StatusMapping(t *testing.T) { |
| 8 | fm := FieldMap{ |
| 9 | Status: map[string]string{ |
| 10 | "open": "pending", |
| 11 | "closed": "completed", |
| 12 | }, |
| 13 | } |
| 14 | |
| 15 | ext := ExternalTask{Title: "Test", Status: "open"} |
| 16 | mapped := MapExternalTask(ext, fm) |
| 17 | |
| 18 | if mapped.Status != "pending" { |
| 19 | t.Errorf("expected status=pending, got %q", mapped.Status) |
| 20 | } |
| 21 | |
| 22 | ext.Status = "closed" |
| 23 | mapped = MapExternalTask(ext, fm) |
| 24 | |
| 25 | if mapped.Status != "completed" { |
| 26 | t.Errorf("expected status=completed, got %q", mapped.Status) |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | func TestMapExternalTask_StatusFallback(t *testing.T) { |
| 31 | fm := FieldMap{ |
nothing calls this directly
no test coverage detected