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

Function TestMapExternalTask_StatusMapping

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

Source from the content-addressed store, hash-verified

5)
6
7func 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
30func TestMapExternalTask_StatusFallback(t *testing.T) {
31 fm := FieldMap{

Callers

nothing calls this directly

Calls 1

MapExternalTaskFunction · 0.85

Tested by

no test coverage detected