(t *testing.T)
| 1025 | } |
| 1026 | |
| 1027 | func TestPRCheckout_differentRepo_existingBranch(t *testing.T) { |
| 1028 | http := &httpmock.Registry{} |
| 1029 | defer http.Verify(t) |
| 1030 | |
| 1031 | baseRepo, pr := stubPR("OWNER/REPO:master", "hubot/REPO:feature") |
| 1032 | shared.StubFinderForRunCommandStyleTests(t, "123", pr, baseRepo) |
| 1033 | |
| 1034 | cs, cmdTeardown := run.Stub() |
| 1035 | defer cmdTeardown(t) |
| 1036 | cs.Register(`git fetch origin refs/pull/123/head:feature --no-tags`, 0, "") |
| 1037 | cs.Register(`git config branch\.feature\.merge`, 0, "refs/heads/feature\n") |
| 1038 | cs.Register(`git checkout feature`, 0, "") |
| 1039 | |
| 1040 | output, err := runCommand(http, nil, "master", `123`, baseRepo) |
| 1041 | assert.NoError(t, err) |
| 1042 | assert.Equal(t, "", output.String()) |
| 1043 | assert.Equal(t, "", output.Stderr()) |
| 1044 | } |
| 1045 | |
| 1046 | func TestPRCheckout_detachedHead(t *testing.T) { |
| 1047 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected