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

Function mockEmptyV2ProjectItems

pkg/cmd/issue/view/view_test.go:613–621  ·  view source on GitHub ↗

mockEmptyV2ProjectItems registers GraphQL queries to report an issue is not contained on any v2 projects.

(t *testing.T, r *httpmock.Registry)

Source from the content-addressed store, hash-verified

611
612// mockEmptyV2ProjectItems registers GraphQL queries to report an issue is not contained on any v2 projects.
613func mockEmptyV2ProjectItems(t *testing.T, r *httpmock.Registry) {
614 r.Register(httpmock.GraphQL(`query IssueProjectItems\b`), httpmock.StringResponse(`
615 { "data": { "repository": { "issue": {
616 "projectItems": {
617 "totalCount": 0,
618 "nodes": []
619 } } } } }
620 `))
621}
622
623// mockV2ProjectItems registers GraphQL queries to report an issue on multiple v2 projects in various states
624// - `NO_STATUS_ITEM`: emulates this issue is on a project but is not given a status

Calls 3

GraphQLFunction · 0.92
StringResponseFunction · 0.92
RegisterMethod · 0.45

Tested by

no test coverage detected