(t *testing.T)
| 1044 | } |
| 1045 | |
| 1046 | func TestPRCheckout_detachedHead(t *testing.T) { |
| 1047 | http := &httpmock.Registry{} |
| 1048 | defer http.Verify(t) |
| 1049 | |
| 1050 | baseRepo, pr := stubPR("OWNER/REPO:master", "hubot/REPO:feature") |
| 1051 | shared.StubFinderForRunCommandStyleTests(t, "123", pr, baseRepo) |
| 1052 | |
| 1053 | cs, cmdTeardown := run.Stub() |
| 1054 | defer cmdTeardown(t) |
| 1055 | cs.Register(`git fetch origin refs/pull/123/head:feature --no-tags`, 0, "") |
| 1056 | cs.Register(`git config branch\.feature\.merge`, 0, "refs/heads/feature\n") |
| 1057 | cs.Register(`git checkout feature`, 0, "") |
| 1058 | |
| 1059 | output, err := runCommand(http, nil, "", `123`, baseRepo) |
| 1060 | assert.NoError(t, err) |
| 1061 | assert.Equal(t, "", output.String()) |
| 1062 | assert.Equal(t, "", output.Stderr()) |
| 1063 | } |
| 1064 | |
| 1065 | func TestPRCheckout_differentRepo_currentBranch(t *testing.T) { |
| 1066 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected