(t *testing.T)
| 275 | } |
| 276 | |
| 277 | func TestCmdShowTaskWorkdirAnnotation(t *testing.T) { |
| 278 | root, db := showListEditDB(t) |
| 279 | wd := filepath.Join(root, "code", "foo") |
| 280 | if err := flowdb.UpsertWorkdir(db, wd, "foo-repo", "", "git@github.com:me/foo.git"); err != nil { |
| 281 | t.Fatal(err) |
| 282 | } |
| 283 | insertTask(t, db, "t-annot", "T", "backlog", "medium", wd, nil) |
| 284 | out := captureStdout(t, func() { |
| 285 | if rc := cmdShow([]string{"task", "t-annot"}); rc != 0 { |
| 286 | t.Errorf("rc=%d", rc) |
| 287 | } |
| 288 | }) |
| 289 | if !strings.Contains(out, "known: foo-repo") { |
| 290 | t.Errorf("expected workdir nickname annotation; out=%q", out) |
| 291 | } |
| 292 | if !strings.Contains(out, "origin: git@github.com:me/foo.git") { |
| 293 | t.Errorf("expected workdir remote annotation; out=%q", out) |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | func TestCmdShowTaskWaitingOn(t *testing.T) { |
| 298 | root, db := showListEditDB(t) |
nothing calls this directly
no test coverage detected