MCPcopy Create free account
hub / github.com/cli/cli / TestPRList_nontty

Function TestPRList_nontty

pkg/cmd/pr/list/list_test.go:100–117  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

98}
99
100func TestPRList_nontty(t *testing.T) {
101 http := initFakeHTTP()
102 defer http.Verify(t)
103
104 http.Register(httpmock.GraphQL(`query PullRequestList\b`), httpmock.FileResponse("./fixtures/prList.json"))
105
106 output, err := runCommand(http, nil, false, "")
107 if err != nil {
108 t.Fatal(err)
109 }
110
111 assert.Equal(t, "", output.Stderr())
112
113 assert.Equal(t, `32 New feature feature DRAFT 2022-08-24T20:01:12Z
11429 Fixed bad bug hubot:bug-fix OPEN 2022-07-20T19:01:12Z
11528 Improve documentation docs MERGED 2020-01-26T19:01:12Z
116`, output.String())
117}
118
119func TestPRList_filtering(t *testing.T) {
120 http := initFakeHTTP()

Callers

nothing calls this directly

Calls 9

GraphQLFunction · 0.92
FileResponseFunction · 0.92
EqualMethod · 0.80
StderrMethod · 0.80
initFakeHTTPFunction · 0.70
runCommandFunction · 0.70
VerifyMethod · 0.65
StringMethod · 0.65
RegisterMethod · 0.45

Tested by

no test coverage detected