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

Function TestSet_AllValidEfforts

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

Source from the content-addressed store, hash-verified

414}
415
416func TestSet_AllValidEfforts(t *testing.T) {
417 efforts := []string{"small", "medium", "large"}
418 for _, effort := range efforts {
419 t.Run(effort, func(t *testing.T) {
420 tmpDir := createSetTestFiles(t)
421 resetSetFlags()
422 taskDir = tmpDir
423 setTaskID = "002"
424 setEffort = effort
425
426 _, err := captureSetOutput(t)
427 if err != nil {
428 t.Fatalf("unexpected error for effort %q: %v", effort, err)
429 }
430
431 content, _ := os.ReadFile(filepath.Join(tmpDir, "002-auth.md"))
432 if !strings.Contains(string(content), "effort: "+effort) {
433 t.Errorf("Expected file to contain effort: %s", effort)
434 }
435 })
436 }
437}
438
439func TestSet_InvalidStatus(t *testing.T) {
440 tmpDir := createSetTestFiles(t)

Callers

nothing calls this directly

Calls 3

createSetTestFilesFunction · 0.85
resetSetFlagsFunction · 0.85
captureSetOutputFunction · 0.85

Tested by

no test coverage detected