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

Function TestPRReady_alreadyReady

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

Source from the content-addressed store, hash-verified

146}
147
148func TestPRReady_alreadyReady(t *testing.T) {
149 http := &httpmock.Registry{}
150 defer http.Verify(t)
151
152 shared.StubFinderForRunCommandStyleTests(t, "123", &api.PullRequest{
153 ID: "THE-ID",
154 Number: 123,
155 State: "OPEN",
156 IsDraft: false,
157 }, ghrepo.New("OWNER", "REPO"))
158
159 output, err := runCommand(http, true, "123")
160 assert.NoError(t, err)
161 assert.Equal(t, "", output.String())
162 assert.Equal(t, "! Pull request OWNER/REPO#123 is already \"ready for review\"\n", output.Stderr())
163}
164
165func TestPRReadyUndo(t *testing.T) {
166 http := &httpmock.Registry{}

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