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

Function TestSet_AllValidPriorities

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

Source from the content-addressed store, hash-verified

391}
392
393func TestSet_AllValidPriorities(t *testing.T) {
394 priorities := []string{"low", "medium", "high", "critical"}
395 for _, priority := range priorities {
396 t.Run(priority, func(t *testing.T) {
397 tmpDir := createSetTestFiles(t)
398 resetSetFlags()
399 taskDir = tmpDir
400 setTaskID = "001"
401 setPriority = priority
402
403 _, err := captureSetOutput(t)
404 if err != nil {
405 t.Fatalf("unexpected error for priority %q: %v", priority, err)
406 }
407
408 content, _ := os.ReadFile(filepath.Join(tmpDir, "001-setup.md"))
409 if !strings.Contains(string(content), "priority: "+priority) {
410 t.Errorf("Expected file to contain priority: %s", priority)
411 }
412 })
413 }
414}
415
416func TestSet_AllValidEfforts(t *testing.T) {
417 efforts := []string{"small", "medium", "large"}

Callers

nothing calls this directly

Calls 3

createSetTestFilesFunction · 0.85
resetSetFlagsFunction · 0.85
captureSetOutputFunction · 0.85

Tested by

no test coverage detected