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

Function TestSet_Status

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

Source from the content-addressed store, hash-verified

158}
159
160func TestSet_Status(t *testing.T) {
161 tmpDir := createSetTestFiles(t)
162 resetSetFlags()
163 taskDir = tmpDir
164 setTaskID = "001"
165 setStatus = "completed"
166
167 output, err := captureSetOutput(t)
168 if err != nil {
169 t.Fatalf("unexpected error: %v", err)
170 }
171
172 if !strings.Contains(output, "Updated task 001") {
173 t.Error("Expected confirmation message")
174 }
175 if !strings.Contains(output, "status: pending -> completed") {
176 t.Errorf("Expected status change in output, got: %s", output)
177 }
178
179 content, _ := os.ReadFile(filepath.Join(tmpDir, "001-setup.md"))
180 if !strings.Contains(string(content), "status: completed") {
181 t.Error("Expected file to contain updated status")
182 }
183}
184
185func TestSet_Priority(t *testing.T) {
186 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