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

Function TestSet_CancelledStatus

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

Source from the content-addressed store, hash-verified

369}
370
371func TestSet_CancelledStatus(t *testing.T) {
372 tmpDir := createSetTestFiles(t)
373 resetSetFlags()
374 taskDir = tmpDir
375 setTaskID = "002"
376 setStatus = "cancelled"
377
378 output, err := captureSetOutput(t)
379 if err != nil {
380 t.Fatalf("unexpected error when setting status to cancelled: %v", err)
381 }
382
383 if !strings.Contains(output, "status: in-progress -> cancelled") {
384 t.Errorf("Expected status change to cancelled in output, got: %s", output)
385 }
386
387 content, _ := os.ReadFile(filepath.Join(tmpDir, "002-auth.md"))
388 if !strings.Contains(string(content), "status: cancelled") {
389 t.Error("Expected file to contain status: cancelled")
390 }
391}
392
393func TestSet_AllValidPriorities(t *testing.T) {
394 priorities := []string{"low", "medium", "high", "critical"}

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