(t *testing.T)
| 295 | } |
| 296 | |
| 297 | func TestCmdShowTaskWaitingOn(t *testing.T) { |
| 298 | root, db := showListEditDB(t) |
| 299 | insertTask(t, db, "waiter", "W", "in-progress", "medium", filepath.Join(root, "x"), nil) |
| 300 | if _, err := db.Exec(`UPDATE tasks SET waiting_on = ? WHERE slug = ?`, "Alice review", "waiter"); err != nil { |
| 301 | t.Fatal(err) |
| 302 | } |
| 303 | out := captureStdout(t, func() { |
| 304 | if rc := cmdShow([]string{"task", "waiter"}); rc != 0 { |
| 305 | t.Errorf("rc=%d", rc) |
| 306 | } |
| 307 | }) |
| 308 | if !strings.Contains(out, "waiting_on: Alice review") { |
| 309 | t.Errorf("missing waiting_on line; out=%q", out) |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | func TestCmdShowTaskArchivedStillShown(t *testing.T) { |
| 314 | root, db := showListEditDB(t) |
nothing calls this directly
no test coverage detected