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

Function TestListCommand_PhaseColumn

apps/cli/internal/cli/list_test.go:694–714  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

692}
693
694func TestListCommand_PhaseColumn(t *testing.T) {
695 resetListFlags()
696
697 tasks := []*model.Task{
698 {ID: "001", Title: "Feature A", Status: model.StatusPending, Phase: "v0.2"},
699 {ID: "002", Title: "Feature B", Status: model.StatusPending, Phase: "v0.3"},
700 {ID: "003", Title: "Feature C", Status: model.StatusPending},
701 }
702
703 output := captureListTableOutput(t, tasks, "id,title,phase")
704
705 if !strings.Contains(output, "phase") {
706 t.Error("Expected 'phase' column header in output")
707 }
708 if !strings.Contains(output, "v0.2") {
709 t.Error("Expected phase value 'v0.2' in output")
710 }
711 if !strings.Contains(output, "v0.3") {
712 t.Error("Expected phase value 'v0.3' in output")
713 }
714}
715
716func TestFilterTasksByPhase(t *testing.T) {
717 tasks := []*model.Task{

Callers

nothing calls this directly

Calls 3

resetListFlagsFunction · 0.85
captureListTableOutputFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected