(t *testing.T)
| 188 | } |
| 189 | |
| 190 | func TestPRReadyUndo_alreadyDraft(t *testing.T) { |
| 191 | http := &httpmock.Registry{} |
| 192 | defer http.Verify(t) |
| 193 | |
| 194 | shared.StubFinderForRunCommandStyleTests(t, "123", &api.PullRequest{ |
| 195 | ID: "THE-ID", |
| 196 | Number: 123, |
| 197 | State: "OPEN", |
| 198 | IsDraft: true, |
| 199 | }, ghrepo.New("OWNER", "REPO")) |
| 200 | |
| 201 | output, err := runCommand(http, true, "123 --undo") |
| 202 | assert.NoError(t, err) |
| 203 | assert.Equal(t, "", output.String()) |
| 204 | assert.Equal(t, "! Pull request OWNER/REPO#123 is already \"in draft\"\n", output.Stderr()) |
| 205 | } |
| 206 | |
| 207 | func TestPRReady_closed(t *testing.T) { |
| 208 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected