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

Function TestSet_DoneFlag

apps/cli/internal/cli/set_test.go:289–309  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

287}
288
289func TestSet_DoneFlag(t *testing.T) {
290 tmpDir := createSetTestFiles(t)
291 resetSetFlags()
292 taskDir = tmpDir
293 setTaskID = "001"
294 setDone = true
295
296 output, err := captureSetOutput(t)
297 if err != nil {
298 t.Fatalf("unexpected error: %v", err)
299 }
300
301 if !strings.Contains(output, "status: pending -> completed") {
302 t.Errorf("Expected --done to set status to completed, got: %s", output)
303 }
304
305 content, _ := os.ReadFile(filepath.Join(tmpDir, "001-setup.md"))
306 if !strings.Contains(string(content), "status: completed") {
307 t.Error("Expected file to contain completed status")
308 }
309}
310
311func TestSet_MultipleFields(t *testing.T) {
312 tmpDir := createSetTestFiles(t)

Callers

nothing calls this directly

Calls 4

createSetTestFilesFunction · 0.85
resetSetFlagsFunction · 0.85
captureSetOutputFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected