(t *testing.T)
| 151 | } |
| 152 | |
| 153 | func TestMapExternalTask_EmptyFieldMap(t *testing.T) { |
| 154 | fm := FieldMap{} |
| 155 | |
| 156 | ext := ExternalTask{ |
| 157 | Title: "Test", |
| 158 | Status: "open", |
| 159 | Priority: "high", |
| 160 | Assignee: "bob", |
| 161 | Labels: []string{"label1"}, |
| 162 | } |
| 163 | mapped := MapExternalTask(ext, fm) |
| 164 | |
| 165 | if mapped.Status != "pending" { |
| 166 | t.Errorf("expected default status=pending, got %q", mapped.Status) |
| 167 | } |
| 168 | if mapped.Priority != "" { |
| 169 | t.Errorf("expected empty priority, got %q", mapped.Priority) |
| 170 | } |
| 171 | if mapped.Owner != "" { |
| 172 | t.Errorf("expected empty owner, got %q", mapped.Owner) |
| 173 | } |
| 174 | if len(mapped.Tags) != 0 { |
| 175 | t.Errorf("expected no tags, got %v", mapped.Tags) |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | func TestNormalizeLabel(t *testing.T) { |
| 180 | tests := []struct { |
nothing calls this directly
no test coverage detected