(t *testing.T)
| 158 | } |
| 159 | |
| 160 | func 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 | |
| 185 | func TestSet_Priority(t *testing.T) { |
| 186 | tmpDir := createSetTestFiles(t) |
nothing calls this directly
no test coverage detected