MCPcopy
hub / github.com/cli/cli / TestIssueRepoInfo_notFound

Function TestIssueRepoInfo_notFound

api/queries_repo_test.go:135–147  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

133}
134
135func TestIssueRepoInfo_notFound(t *testing.T) {
136 httpReg := &httpmock.Registry{}
137 defer httpReg.Verify(t)
138
139 httpReg.Register(
140 httpmock.GraphQL(`query IssueRepositoryInfo\b`),
141 httpmock.StringResponse(`{ "data": { "repository": null } }`))
142
143 client := newTestClient(httpReg)
144 repo, err := IssueRepoInfo(client, ghrepo.New("OWNER", "REPO"))
145 require.EqualError(t, err, "GraphQL: Could not resolve to a Repository with the name 'OWNER/REPO'.")
146 assert.Nil(t, repo)
147}
148
149func TestIssueRepoInfo_success(t *testing.T) {
150 httpReg := &httpmock.Registry{}

Callers

nothing calls this directly

Calls 7

VerifyMethod · 0.95
RegisterMethod · 0.95
GraphQLFunction · 0.92
StringResponseFunction · 0.92
NewFunction · 0.92
newTestClientFunction · 0.85
IssueRepoInfoFunction · 0.85

Tested by

no test coverage detected