(t *testing.T)
| 1099 | } |
| 1100 | |
| 1101 | func TestPRCheckout_maintainerCanModify(t *testing.T) { |
| 1102 | http := &httpmock.Registry{} |
| 1103 | defer http.Verify(t) |
| 1104 | |
| 1105 | baseRepo, pr := stubPR("OWNER/REPO:master", "hubot/REPO:feature") |
| 1106 | pr.MaintainerCanModify = true |
| 1107 | shared.StubFinderForRunCommandStyleTests(t, "123", pr, baseRepo) |
| 1108 | |
| 1109 | cs, cmdTeardown := run.Stub() |
| 1110 | defer cmdTeardown(t) |
| 1111 | cs.Register(`git fetch origin refs/pull/123/head:feature --no-tags`, 0, "") |
| 1112 | cs.Register(`git config branch\.feature\.merge`, 1, "") |
| 1113 | cs.Register(`git checkout feature`, 0, "") |
| 1114 | cs.Register(`git config branch\.feature\.remote https://github\.com/hubot/REPO\.git`, 0, "") |
| 1115 | cs.Register(`git config branch\.feature\.pushRemote https://github\.com/hubot/REPO\.git`, 0, "") |
| 1116 | cs.Register(`git config branch\.feature\.merge refs/heads/feature`, 0, "") |
| 1117 | |
| 1118 | output, err := runCommand(http, nil, "master", `123`, baseRepo) |
| 1119 | assert.NoError(t, err) |
| 1120 | assert.Equal(t, "", output.String()) |
| 1121 | assert.Equal(t, "", output.Stderr()) |
| 1122 | } |
| 1123 | |
| 1124 | func TestPRCheckout_recurseSubmodules(t *testing.T) { |
| 1125 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected