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

Function TestPRReopen_alreadyOpen

pkg/cmd/pr/reopen/reopen_test.go:77–92  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

75}
76
77func TestPRReopen_alreadyOpen(t *testing.T) {
78 http := &httpmock.Registry{}
79 defer http.Verify(t)
80
81 shared.StubFinderForRunCommandStyleTests(t, "123", &api.PullRequest{
82 ID: "THE-ID",
83 Number: 123,
84 State: "OPEN",
85 Title: "The title of the PR",
86 }, ghrepo.New("OWNER", "REPO"))
87
88 output, err := runCommand(http, true, "123")
89 assert.NoError(t, err)
90 assert.Equal(t, "", output.String())
91 assert.Equal(t, "! Pull request OWNER/REPO#123 (The title of the PR) is already open\n", output.Stderr())
92}
93
94func TestPRReopen_alreadyMerged(t *testing.T) {
95 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