MCPcopy
hub / github.com/cli/cli / mockEmptyV2ProjectItems

Function mockEmptyV2ProjectItems

pkg/cmd/issue/view/view_test.go:601–609  ·  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

599
600// mockEmptyV2ProjectItems registers GraphQL queries to report an issue is not contained on any v2 projects.
601func mockEmptyV2ProjectItems(t *testing.T, r *httpmock.Registry) {
602 r.Register(httpmock.GraphQL(`query IssueProjectItems\b`), httpmock.StringResponse(`
603 { "data": { "repository": { "issue": {
604 "projectItems": {
605 "totalCount": 0,
606 "nodes": []
607 } } } } }
608 `))
609}
610
611// mockV2ProjectItems registers GraphQL queries to report an issue on multiple v2 projects in various states
612// - `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