(t *testing.T)
| 400 | } |
| 401 | |
| 402 | func TestRunRm_DuplicateIDError(t *testing.T) { |
| 403 | tmpDir := createDuplicateTestFiles(t) |
| 404 | |
| 405 | taskDir = tmpDir |
| 406 | rmForce = true |
| 407 | rmDryRun = false |
| 408 | |
| 409 | err := runRm(rmCmd, []string{"042"}) |
| 410 | if err == nil { |
| 411 | t.Fatal("expected error for duplicate ID, got nil") |
| 412 | } |
| 413 | if !strings.Contains(err.Error(), "refusing to delete") { |
| 414 | t.Errorf("expected 'refusing to delete' error, got: %v", err) |
| 415 | } |
| 416 | if !strings.Contains(err.Error(), "042") { |
| 417 | t.Errorf("expected error to mention ID 042, got: %v", err) |
| 418 | } |
| 419 | } |
nothing calls this directly
no test coverage detected