--- Update Command Integration Tests --- TestUpdateCommand_NoMergeFlag verifies that --no-merge flag is recognized.
(t *testing.T)
| 158 | |
| 159 | // TestUpdateCommand_NoMergeFlag verifies that --no-merge flag is recognized. |
| 160 | func TestUpdateCommand_NoMergeFlag(t *testing.T) { |
| 161 | setup := setupUpdateIntegrationTest(t) |
| 162 | defer setup.cleanup() |
| 163 | |
| 164 | // Run the update command with --no-merge flag — should be accepted |
| 165 | cmd := exec.Command(setup.binaryPath, "update", "--no-merge", "--verbose") |
| 166 | cmd.Dir = setup.tempDir |
| 167 | output, err := cmd.CombinedOutput() |
| 168 | outputStr := string(output) |
| 169 | |
| 170 | // The --no-merge flag should be recognized (not "unknown flag"). |
| 171 | // When no source workflows exist, the command succeeds with an info message. |
| 172 | assert.NoError(t, err, "Should succeed (no source workflows = info message, not error), output: %s", outputStr) |
| 173 | assert.NotContains(t, outputStr, "unknown flag", "The --no-merge flag should be recognized") |
| 174 | assert.Contains(t, outputStr, "no workflows found", "Should report no workflows found") |
| 175 | } |
| 176 | |
| 177 | // TestUpdateCommand_NoRedirectFlag verifies that --no-redirect flag is recognized. |
| 178 | func TestUpdateCommand_NoRedirectFlag(t *testing.T) { |
nothing calls this directly
no test coverage detected