(t *testing.T)
| 216 | } |
| 217 | |
| 218 | func 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 | |
| 232 | func TestIssueRepoInfo_success(t *testing.T) { |
| 233 | httpReg := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected