MCPcopy Create free account
hub / github.com/driangle/taskmd / TestMapExternalTask_EmptyFieldMap

Function TestMapExternalTask_EmptyFieldMap

apps/cli/internal/sync/mapper_test.go:153–177  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

151}
152
153func 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
179func TestNormalizeLabel(t *testing.T) {
180 tests := []struct {

Callers

nothing calls this directly

Calls 1

MapExternalTaskFunction · 0.85

Tested by

no test coverage detected