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

Function TestSet_Priority

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

Source from the content-addressed store, hash-verified

183}
184
185func TestSet_Priority(t *testing.T) {
186 tmpDir := createSetTestFiles(t)
187 resetSetFlags()
188 taskDir = tmpDir
189 setTaskID = "001"
190 setPriority = "low"
191
192 output, err := captureSetOutput(t)
193 if err != nil {
194 t.Fatalf("unexpected error: %v", err)
195 }
196
197 if !strings.Contains(output, "priority: high -> low") {
198 t.Errorf("Expected priority change in output, got: %s", output)
199 }
200
201 content, _ := os.ReadFile(filepath.Join(tmpDir, "001-setup.md"))
202 if !strings.Contains(string(content), "priority: low") {
203 t.Error("Expected file to contain updated priority")
204 }
205}
206
207func TestSet_Effort(t *testing.T) {
208 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