(t *testing.T)
| 706 | } |
| 707 | |
| 708 | func TestPRCheckout_maintainerCanModify(t *testing.T) { |
| 709 | http := &httpmock.Registry{} |
| 710 | defer http.Verify(t) |
| 711 | |
| 712 | baseRepo, pr := stubPR("OWNER/REPO:master", "hubot/REPO:feature") |
| 713 | pr.MaintainerCanModify = true |
| 714 | shared.StubFinderForRunCommandStyleTests(t, "123", pr, baseRepo) |
| 715 | |
| 716 | cs, cmdTeardown := run.Stub() |
| 717 | defer cmdTeardown(t) |
| 718 | cs.Register(`git fetch origin refs/pull/123/head:feature --no-tags`, 0, "") |
| 719 | cs.Register(`git config branch\.feature\.merge`, 1, "") |
| 720 | cs.Register(`git checkout feature`, 0, "") |
| 721 | cs.Register(`git config branch\.feature\.remote https://github\.com/hubot/REPO\.git`, 0, "") |
| 722 | cs.Register(`git config branch\.feature\.pushRemote https://github\.com/hubot/REPO\.git`, 0, "") |
| 723 | cs.Register(`git config branch\.feature\.merge refs/heads/feature`, 0, "") |
| 724 | |
| 725 | output, err := runCommand(http, nil, "master", `123`, baseRepo) |
| 726 | assert.NoError(t, err) |
| 727 | assert.Equal(t, "", output.String()) |
| 728 | assert.Equal(t, "", output.Stderr()) |
| 729 | } |
| 730 | |
| 731 | func TestPRCheckout_recurseSubmodules(t *testing.T) { |
| 732 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected