TestUpdateCommand_HelpText verifies the update command help text is correct.
(t *testing.T)
| 211 | |
| 212 | // TestUpdateCommand_HelpText verifies the update command help text is correct. |
| 213 | func TestUpdateCommand_HelpText(t *testing.T) { |
| 214 | setup := setupUpdateIntegrationTest(t) |
| 215 | defer setup.cleanup() |
| 216 | |
| 217 | cmd := exec.Command(setup.binaryPath, "update", "--help") |
| 218 | cmd.Dir = setup.tempDir |
| 219 | output, err := cmd.CombinedOutput() |
| 220 | require.NoError(t, err, "Help should not return error") |
| 221 | |
| 222 | outputStr := string(output) |
| 223 | |
| 224 | // Should mention merge behavior |
| 225 | assert.Contains(t, outputStr, "no-merge", "Help should document --no-merge flag") |
| 226 | assert.Contains(t, outputStr, "no-redirect", "Help should document --no-redirect flag") |
| 227 | assert.Contains(t, outputStr, "no-security-scanner", "Help should document --no-security-scanner flag") |
| 228 | assert.Contains(t, outputStr, "repo", "Help should document --repo flag") |
| 229 | assert.Contains(t, outputStr, "org", "Help should document --org flag") |
| 230 | assert.Contains(t, outputStr, "repos", "Help should document --repos flag") |
| 231 | assert.Contains(t, outputStr, "3-way merge", "Help should explain merge behavior") |
| 232 | |
| 233 | // Should reference upgrade for other features |
| 234 | assert.Contains(t, outputStr, "upgrade", "Help should reference 'gh aw upgrade' for other features") |
| 235 | |
| 236 | // Should NOT mention removed flags |
| 237 | assert.NotContains(t, outputStr, "--pr", "Help should not mention removed --pr flag") |
| 238 | assert.NotContains(t, outputStr, "--audit", "Help should not mention removed --audit flag") |
| 239 | assert.NotContains(t, outputStr, "--dry-run", "Help should not mention removed --dry-run flag") |
| 240 | } |
| 241 | |
| 242 | // TestUpdateCommand_RepoFlag verifies that --repo is recognized. |
| 243 | func TestUpdateCommand_RepoFlag(t *testing.T) { |
nothing calls this directly
no test coverage detected