(t *testing.T)
| 227 | } |
| 228 | |
| 229 | func TestSet_Owner(t *testing.T) { |
| 230 | tmpDir := createSetTestFiles(t) |
| 231 | resetSetFlags() |
| 232 | taskDir = tmpDir |
| 233 | setTaskID = "001" |
| 234 | setOwner = "alice" |
| 235 | |
| 236 | output, err := captureSetOutput(t) |
| 237 | if err != nil { |
| 238 | t.Fatalf("unexpected error: %v", err) |
| 239 | } |
| 240 | |
| 241 | if !strings.Contains(output, "owner: (unset) -> alice") { |
| 242 | t.Errorf("Expected owner change in output, got: %s", output) |
| 243 | } |
| 244 | |
| 245 | content, _ := os.ReadFile(filepath.Join(tmpDir, "001-setup.md")) |
| 246 | if !strings.Contains(string(content), "owner: alice") { |
| 247 | t.Errorf("Expected file to contain owner: alice, got:\n%s", string(content)) |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | func TestSet_OwnerUpdateExisting(t *testing.T) { |
| 252 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected