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