(t *testing.T)
| 127 | } |
| 128 | |
| 129 | func TestPrClose_alreadyClosed(t *testing.T) { |
| 130 | http := &httpmock.Registry{} |
| 131 | defer http.Verify(t) |
| 132 | |
| 133 | baseRepo, pr := stubPR("OWNER/REPO", "OWNER/REPO:feature") |
| 134 | pr.State = "CLOSED" |
| 135 | pr.Title = "The title of the PR" |
| 136 | shared.StubFinderForRunCommandStyleTests(t, "96", pr, baseRepo) |
| 137 | |
| 138 | output, err := runCommand(http, true, "96") |
| 139 | assert.NoError(t, err) |
| 140 | assert.Equal(t, "", output.String()) |
| 141 | assert.Equal(t, "! Pull request OWNER/REPO#96 (The title of the PR) is already closed\n", output.Stderr()) |
| 142 | } |
| 143 | |
| 144 | func TestPrClose_deleteBranch_sameRepo(t *testing.T) { |
| 145 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected