(t *testing.T)
| 75 | } |
| 76 | |
| 77 | func TestPRReopen_alreadyOpen(t *testing.T) { |
| 78 | http := &httpmock.Registry{} |
| 79 | defer http.Verify(t) |
| 80 | |
| 81 | shared.StubFinderForRunCommandStyleTests(t, "123", &api.PullRequest{ |
| 82 | ID: "THE-ID", |
| 83 | Number: 123, |
| 84 | State: "OPEN", |
| 85 | Title: "The title of the PR", |
| 86 | }, ghrepo.New("OWNER", "REPO")) |
| 87 | |
| 88 | output, err := runCommand(http, true, "123") |
| 89 | assert.NoError(t, err) |
| 90 | assert.Equal(t, "", output.String()) |
| 91 | assert.Equal(t, "! Pull request OWNER/REPO#123 (The title of the PR) is already open\n", output.Stderr()) |
| 92 | } |
| 93 | |
| 94 | func TestPRReopen_alreadyMerged(t *testing.T) { |
| 95 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected