MCPcopy
hub / github.com/cli/cli / searchResp

Function searchResp

pkg/cmd/discussion/client/client_test.go:91–106  ·  view source on GitHub ↗

searchResp builds a mock search JSON response.

(hasNext bool, endCursor string, count int, nodes string)

Source from the content-addressed store, hash-verified

89
90// searchResp builds a mock search JSON response.
91func searchResp(hasNext bool, endCursor string, count int, nodes string) string {
92 return heredoc.Docf(`
93 {
94 "data": {
95 "search": {
96 "discussionCount": %d,
97 "pageInfo": {
98 "hasNextPage": %t,
99 "endCursor": %q
100 },
101 "nodes": [%s]
102 }
103 }
104 }
105 `, count, hasNext, endCursor, nodes)
106}
107
108func TestList(t *testing.T) {
109 repo := ghrepo.New("OWNER", "REPO")

Callers 1

TestSearchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected