(t *testing.T)
| 227 | } |
| 228 | |
| 229 | func TestIssueRepoInfo_notFound(t *testing.T) { |
| 230 | httpReg := &httpmock.Registry{} |
| 231 | defer httpReg.Verify(t) |
| 232 | |
| 233 | httpReg.Register( |
| 234 | httpmock.GraphQL(`query IssueRepositoryInfo\b`), |
| 235 | httpmock.StringResponse(`{ "data": { "repository": null } }`)) |
| 236 | |
| 237 | client := newTestClient(httpReg) |
| 238 | repo, err := IssueRepoInfo(client, ghrepo.New("OWNER", "REPO")) |
| 239 | require.EqualError(t, err, "GraphQL: Could not resolve to a Repository with the name 'OWNER/REPO'.") |
| 240 | assert.Nil(t, repo) |
| 241 | } |
| 242 | |
| 243 | func TestIssueRepoInfo_success(t *testing.T) { |
| 244 | httpReg := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected