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

Function TestStatus_YAMLFormat

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

Source from the content-addressed store, hash-verified

217}
218
219func TestStatus_YAMLFormat(t *testing.T) {
220 tmpDir := createStatusTestFiles(t)
221 resetStatusFlags()
222 taskDir = tmpDir
223 statusFormat = "yaml"
224
225 output := captureStatusOutput(t, "001")
226
227 expected := []string{"id: \"001\"", "title: Setup project", "status: completed"}
228 for _, exp := range expected {
229 if !strings.Contains(output, exp) {
230 t.Errorf("Expected YAML output to contain %q", exp)
231 }
232 }
233
234 // Verify no content field
235 if strings.Contains(output, "content:") {
236 t.Error("YAML output should not contain 'content' field")
237 }
238}
239
240func TestStatus_UnsupportedFormat(t *testing.T) {
241 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