(t *testing.T)
| 750 | } |
| 751 | |
| 752 | func TestPRCheckout_force(t *testing.T) { |
| 753 | http := &httpmock.Registry{} |
| 754 | |
| 755 | baseRepo, pr := stubPR("OWNER/REPO", "OWNER/REPO:feature") |
| 756 | shared.StubFinderForRunCommandStyleTests(t, "123", pr, baseRepo) |
| 757 | |
| 758 | cs, cmdTeardown := run.Stub() |
| 759 | defer cmdTeardown(t) |
| 760 | cs.Register(`git fetch origin \+refs/heads/feature:refs/remotes/origin/feature --no-tags`, 0, "") |
| 761 | cs.Register(`git show-ref --verify -- refs/heads/feature`, 0, "") |
| 762 | cs.Register(`git checkout feature`, 0, "") |
| 763 | cs.Register(`git reset --hard refs/remotes/origin/feature`, 0, "") |
| 764 | |
| 765 | output, err := runCommand(http, nil, "master", `123 --force`, baseRepo) |
| 766 | |
| 767 | assert.NoError(t, err) |
| 768 | assert.Equal(t, "", output.String()) |
| 769 | assert.Equal(t, "", output.Stderr()) |
| 770 | } |
| 771 | |
| 772 | func TestPRCheckout_detach(t *testing.T) { |
| 773 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected