(t *testing.T)
| 133 | } |
| 134 | |
| 135 | func 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 | |
| 149 | func TestIssueRepoInfo_success(t *testing.T) { |
| 150 | httpReg := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected