(t *testing.T)
| 1063 | } |
| 1064 | |
| 1065 | func TestPRCheckout_differentRepo_currentBranch(t *testing.T) { |
| 1066 | http := &httpmock.Registry{} |
| 1067 | defer http.Verify(t) |
| 1068 | |
| 1069 | baseRepo, pr := stubPR("OWNER/REPO:master", "hubot/REPO:feature") |
| 1070 | shared.StubFinderForRunCommandStyleTests(t, "123", pr, baseRepo) |
| 1071 | |
| 1072 | cs, cmdTeardown := run.Stub() |
| 1073 | defer cmdTeardown(t) |
| 1074 | cs.Register(`git fetch origin refs/pull/123/head --no-tags`, 0, "") |
| 1075 | cs.Register(`git config branch\.feature\.merge`, 0, "refs/heads/feature\n") |
| 1076 | cs.Register(`git merge --ff-only FETCH_HEAD`, 0, "") |
| 1077 | |
| 1078 | output, err := runCommand(http, nil, "feature", `123`, baseRepo) |
| 1079 | assert.NoError(t, err) |
| 1080 | assert.Equal(t, "", output.String()) |
| 1081 | assert.Equal(t, "", output.Stderr()) |
| 1082 | } |
| 1083 | |
| 1084 | func TestPRCheckout_differentRepo_invalidBranchName(t *testing.T) { |
| 1085 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected