(t *testing.T)
| 92 | } |
| 93 | |
| 94 | func TestPRReopen_alreadyMerged(t *testing.T) { |
| 95 | http := &httpmock.Registry{} |
| 96 | defer http.Verify(t) |
| 97 | |
| 98 | shared.StubFinderForRunCommandStyleTests(t, "123", &api.PullRequest{ |
| 99 | ID: "THE-ID", |
| 100 | Number: 123, |
| 101 | State: "MERGED", |
| 102 | Title: "The title of the PR", |
| 103 | }, ghrepo.New("OWNER", "REPO")) |
| 104 | |
| 105 | output, err := runCommand(http, true, "123") |
| 106 | assert.EqualError(t, err, "SilentError") |
| 107 | assert.Equal(t, "", output.String()) |
| 108 | assert.Equal(t, "X Pull request OWNER/REPO#123 (The title of the PR) can't be reopened because it was already merged\n", output.Stderr()) |
| 109 | } |
| 110 | |
| 111 | func TestPRReopen_withComment(t *testing.T) { |
| 112 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected