MCPcopy Index your code
hub / github.com/cli/cli / TestPRReady_closed

Function TestPRReady_closed

pkg/cmd/pr/ready/ready_test.go:207–222  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

205}
206
207func 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}

Callers

nothing calls this directly

Calls 7

VerifyMethod · 0.95
NewFunction · 0.92
EqualMethod · 0.80
StderrMethod · 0.80
runCommandFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected