(t *testing.T)
| 1143 | } |
| 1144 | |
| 1145 | func TestPRCheckout_force(t *testing.T) { |
| 1146 | http := &httpmock.Registry{} |
| 1147 | |
| 1148 | baseRepo, pr := stubPR("OWNER/REPO", "OWNER/REPO:feature") |
| 1149 | shared.StubFinderForRunCommandStyleTests(t, "123", pr, baseRepo) |
| 1150 | |
| 1151 | cs, cmdTeardown := run.Stub() |
| 1152 | defer cmdTeardown(t) |
| 1153 | cs.Register(`git fetch origin \+refs/heads/feature:refs/remotes/origin/feature --no-tags`, 0, "") |
| 1154 | cs.Register(`git rev-parse --verify refs/heads/feature`, 0, "") |
| 1155 | cs.Register(`git checkout feature`, 0, "") |
| 1156 | cs.Register(`git reset --hard refs/remotes/origin/feature`, 0, "") |
| 1157 | |
| 1158 | output, err := runCommand(http, nil, "master", `123 --force`, baseRepo) |
| 1159 | |
| 1160 | assert.NoError(t, err) |
| 1161 | assert.Equal(t, "", output.String()) |
| 1162 | assert.Equal(t, "", output.Stderr()) |
| 1163 | } |
| 1164 | |
| 1165 | func TestPRCheckout_detach(t *testing.T) { |
| 1166 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected