TestUpdateCommand_RemovedFlags verifies that old flags are no longer accepted.
(t *testing.T)
| 191 | |
| 192 | // TestUpdateCommand_RemovedFlags verifies that old flags are no longer accepted. |
| 193 | func TestUpdateCommand_RemovedFlags(t *testing.T) { |
| 194 | setup := setupUpdateIntegrationTest(t) |
| 195 | defer setup.cleanup() |
| 196 | |
| 197 | removedFlags := []string{"--merge", "--no-actions", "--audit", "--dry-run", "--json"} |
| 198 | |
| 199 | for _, flag := range removedFlags { |
| 200 | t.Run(flag, func(t *testing.T) { |
| 201 | cmd := exec.Command(setup.binaryPath, "update", flag) |
| 202 | cmd.Dir = setup.tempDir |
| 203 | output, err := cmd.CombinedOutput() |
| 204 | outputStr := string(output) |
| 205 | |
| 206 | assert.Error(t, err, "Should reject removed flag %s", flag) |
| 207 | assert.Contains(t, outputStr, "unknown flag", "Should report %s as unknown flag, output: %s", flag, outputStr) |
| 208 | }) |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | // TestUpdateCommand_HelpText verifies the update command help text is correct. |
| 213 | func TestUpdateCommand_HelpText(t *testing.T) { |
nothing calls this directly
no test coverage detected