MCPcopy Create free account
hub / github.com/Facets-cloud/flow / TestCmdShowTaskWaitingOn

Function TestCmdShowTaskWaitingOn

internal/app/show_test.go:297–311  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

295}
296
297func 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
313func TestCmdShowTaskArchivedStillShown(t *testing.T) {
314 root, db := showListEditDB(t)

Callers

nothing calls this directly

Calls 4

showListEditDBFunction · 0.85
captureStdoutFunction · 0.85
cmdShowFunction · 0.85
insertTaskFunction · 0.70

Tested by

no test coverage detected