(t *testing.T)
| 217 | } |
| 218 | |
| 219 | func 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 | |
| 240 | func TestStatus_UnsupportedFormat(t *testing.T) { |
| 241 | tmpDir := createStatusTestFiles(t) |
nothing calls this directly
no test coverage detected