(t *testing.T)
| 729 | } |
| 730 | |
| 731 | func TestPRCheckout_recurseSubmodules(t *testing.T) { |
| 732 | http := &httpmock.Registry{} |
| 733 | |
| 734 | baseRepo, pr := stubPR("OWNER/REPO", "OWNER/REPO:feature") |
| 735 | shared.StubFinderForRunCommandStyleTests(t, "123", pr, baseRepo) |
| 736 | |
| 737 | cs, cmdTeardown := run.Stub() |
| 738 | defer cmdTeardown(t) |
| 739 | cs.Register(`git fetch origin \+refs/heads/feature:refs/remotes/origin/feature --no-tags`, 0, "") |
| 740 | cs.Register(`git show-ref --verify -- refs/heads/feature`, 0, "") |
| 741 | cs.Register(`git checkout feature`, 0, "") |
| 742 | cs.Register(`git merge --ff-only refs/remotes/origin/feature`, 0, "") |
| 743 | cs.Register(`git submodule sync --recursive`, 0, "") |
| 744 | cs.Register(`git submodule update --init --recursive`, 0, "") |
| 745 | |
| 746 | output, err := runCommand(http, nil, "master", `123 --recurse-submodules`, baseRepo) |
| 747 | assert.NoError(t, err) |
| 748 | assert.Equal(t, "", output.String()) |
| 749 | assert.Equal(t, "", output.Stderr()) |
| 750 | } |
| 751 | |
| 752 | func TestPRCheckout_force(t *testing.T) { |
| 753 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected