(t *testing.T)
| 81 | } |
| 82 | |
| 83 | func TestCmdShowTaskHappyPath(t *testing.T) { |
| 84 | root, db := showListEditDB(t) |
| 85 | insertProject(t, db, "demo", "Demo", filepath.Join(root, "repo"), "high") |
| 86 | insertTask(t, db, "auth-fix", "Fix auth", "backlog", "high", filepath.Join(root, "repo"), "demo") |
| 87 | |
| 88 | out := captureStdout(t, func() { |
| 89 | if rc := cmdShow([]string{"task", "auth-fix"}); rc != 0 { |
| 90 | t.Errorf("rc=%d", rc) |
| 91 | } |
| 92 | }) |
| 93 | if !strings.Contains(out, "slug: auth-fix") { |
| 94 | t.Errorf("missing slug line; out=%q", out) |
| 95 | } |
| 96 | if !strings.Contains(out, "project: demo") { |
| 97 | t.Errorf("missing project line; out=%q", out) |
| 98 | } |
| 99 | if !strings.Contains(out, "priority: high") { |
| 100 | t.Errorf("missing priority; out=%q", out) |
| 101 | } |
| 102 | if !strings.Contains(out, "session_id: (not bootstrapped)") { |
| 103 | t.Errorf("missing session_id stub; out=%q", out) |
| 104 | } |
| 105 | wantBrief := filepath.Join(root, "tasks", "auth-fix", "brief.md") |
| 106 | if !strings.Contains(out, "brief: "+wantBrief) { |
| 107 | t.Errorf("missing brief path; out=%q", out) |
| 108 | } |
| 109 | if !strings.Contains(out, "updates: (none)") { |
| 110 | t.Errorf("missing no-updates line; out=%q", out) |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | // TestCmdShowTaskAutoRunStatus: `flow show task` surfaces the autonomous |
| 115 | // run status for a task that was launched with --auto. |
nothing calls this directly
no test coverage detected