(t *testing.T)
| 632 | } |
| 633 | |
| 634 | func TestPRCheckout_differentRepo_existingBranch(t *testing.T) { |
| 635 | http := &httpmock.Registry{} |
| 636 | defer http.Verify(t) |
| 637 | |
| 638 | baseRepo, pr := stubPR("OWNER/REPO:master", "hubot/REPO:feature") |
| 639 | shared.StubFinderForRunCommandStyleTests(t, "123", pr, baseRepo) |
| 640 | |
| 641 | cs, cmdTeardown := run.Stub() |
| 642 | defer cmdTeardown(t) |
| 643 | cs.Register(`git fetch origin refs/pull/123/head:feature --no-tags`, 0, "") |
| 644 | cs.Register(`git config branch\.feature\.merge`, 0, "refs/heads/feature\n") |
| 645 | cs.Register(`git checkout feature`, 0, "") |
| 646 | |
| 647 | output, err := runCommand(http, nil, "master", `123`, baseRepo) |
| 648 | assert.NoError(t, err) |
| 649 | assert.Equal(t, "", output.String()) |
| 650 | assert.Equal(t, "", output.Stderr()) |
| 651 | } |
| 652 | |
| 653 | func TestPRCheckout_detachedHead(t *testing.T) { |
| 654 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected