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

Function TestStatus_TextFormat

apps/cli/internal/cli/status_test.go:124–157  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

122}
123
124func TestStatus_TextFormat(t *testing.T) {
125 tmpDir := createStatusTestFiles(t)
126 resetStatusFlags()
127 taskDir = tmpDir
128
129 output := captureStatusOutput(t, "002")
130
131 expected := []string{
132 "Task: 002",
133 "Title: Implement authentication",
134 "Status: in-progress",
135 "Priority: critical",
136 "Effort: large",
137 "Tags: backend, security",
138 "Owner: alice",
139 "Created: 2026-02-08",
140 "Dependencies: 001",
141 "File:",
142 }
143
144 for _, exp := range expected {
145 if !strings.Contains(output, exp) {
146 t.Errorf("Expected output to contain %q", exp)
147 }
148 }
149
150 // Verify no body content is present
151 if strings.Contains(output, "Description:") {
152 t.Error("Status output should not contain Description section")
153 }
154 if strings.Contains(output, "Add JWT-based auth") {
155 t.Error("Status output should not contain body content")
156 }
157}
158
159func TestStatus_TextFormat_ParentField(t *testing.T) {
160 tmpDir := createStatusTestFiles(t)

Callers

nothing calls this directly

Calls 4

createStatusTestFilesFunction · 0.85
resetStatusFlagsFunction · 0.85
captureStatusOutputFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected