MCPcopy
hub / github.com/cli/cli / TestIssueList_tty_withAppFlag

Function TestIssueList_tty_withAppFlag

pkg/cmd/issue/list/list_test.go:191–210  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

189}
190
191func TestIssueList_tty_withAppFlag(t *testing.T) {
192 http := &httpmock.Registry{}
193 defer http.Verify(t)
194
195 http.Register(
196 httpmock.GraphQL(`query IssueList\b`),
197 httpmock.GraphQLQuery(`
198 { "data": { "repository": {
199 "hasIssuesEnabled": true,
200 "issues": { "nodes": [] }
201 } } }`, func(_ string, params map[string]interface{}) {
202 assert.Equal(t, "app/dependabot", params["author"].(string))
203 }))
204
205 output, err := runCommand(http, true, "--app dependabot")
206 assert.EqualError(t, err, "no issues match your search in OWNER/REPO")
207
208 assert.Equal(t, "", output.String())
209 assert.Equal(t, "", output.Stderr())
210}
211
212func TestIssueList_withInvalidLimitFlag(t *testing.T) {
213 http := &httpmock.Registry{}

Callers

nothing calls this directly

Calls 8

VerifyMethod · 0.95
RegisterMethod · 0.95
GraphQLFunction · 0.92
GraphQLQueryFunction · 0.92
EqualMethod · 0.80
StderrMethod · 0.80
runCommandFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected