(t *testing.T)
| 205 | } |
| 206 | |
| 207 | func TestPRReady_closed(t *testing.T) { |
| 208 | http := &httpmock.Registry{} |
| 209 | defer http.Verify(t) |
| 210 | |
| 211 | shared.StubFinderForRunCommandStyleTests(t, "123", &api.PullRequest{ |
| 212 | ID: "THE-ID", |
| 213 | Number: 123, |
| 214 | State: "CLOSED", |
| 215 | IsDraft: true, |
| 216 | }, ghrepo.New("OWNER", "REPO")) |
| 217 | |
| 218 | output, err := runCommand(http, true, "123") |
| 219 | assert.EqualError(t, err, "SilentError") |
| 220 | assert.Equal(t, "", output.String()) |
| 221 | assert.Equal(t, "X Pull request OWNER/REPO#123 is closed. Only draft pull requests can be marked as \"ready for review\"\n", output.Stderr()) |
| 222 | } |
nothing calls this directly
no test coverage detected