MCPcopy
hub / github.com/cli/cli / TestIssueList_tty

Function TestIssueList_tty

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

Source from the content-addressed store, hash-verified

140}
141
142func TestIssueList_tty(t *testing.T) {
143 http := &httpmock.Registry{}
144 defer http.Verify(t)
145
146 http.Register(
147 httpmock.GraphQL(`query IssueList\b`),
148 httpmock.FileResponse("./fixtures/issueList.json"))
149
150 output, err := runCommand(http, true, "")
151 if err != nil {
152 t.Errorf("error running command `issue list`: %v", err)
153 }
154
155 assert.Equal(t, heredoc.Doc(`
156
157 Showing 3 of 3 open issues in OWNER/REPO
158
159 ID TITLE LABELS UPDATED
160 #1 number won label about 1 day ago
161 #2 number too label about 1 month ago
162 #4 number fore label about 2 years ago
163 `), output.String())
164 assert.Equal(t, ``, output.Stderr())
165}
166
167func TestIssueList_tty_withFlags(t *testing.T) {
168 http := &httpmock.Registry{}

Callers

nothing calls this directly

Calls 9

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

Tested by

no test coverage detected