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