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

Function TestIssueRepoInfo_notFound

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

Source from the content-addressed store, hash-verified

216}
217
218func TestIssueRepoInfo_notFound(t *testing.T) {
219 httpReg := &httpmock.Registry{}
220 defer httpReg.Verify(t)
221
222 httpReg.Register(
223 httpmock.GraphQL(`query IssueRepositoryInfo\b`),
224 httpmock.StringResponse(`{ "data": { "repository": null } }`))
225
226 client := newTestClient(httpReg)
227 repo, err := IssueRepoInfo(client, ghrepo.New("OWNER", "REPO"))
228 require.EqualError(t, err, "GraphQL: Could not resolve to a Repository with the name 'OWNER/REPO'.")
229 assert.Nil(t, repo)
230}
231
232func TestIssueRepoInfo_success(t *testing.T) {
233 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