(t *testing.T)
| 17 | ) |
| 18 | |
| 19 | func TestGitHubRepo_notFound(t *testing.T) { |
| 20 | httpReg := &httpmock.Registry{} |
| 21 | defer httpReg.Verify(t) |
| 22 | |
| 23 | httpReg.Register( |
| 24 | httpmock.GraphQL(`query RepositoryInfo\b`), |
| 25 | httpmock.StringResponse(`{ "data": { "repository": null } }`)) |
| 26 | |
| 27 | client := newTestClient(httpReg) |
| 28 | repo, err := GitHubRepo(client, ghrepo.New("OWNER", "REPO")) |
| 29 | require.EqualError(t, err, "GraphQL: Could not resolve to a Repository with the name 'OWNER/REPO'.") |
| 30 | assert.Nil(t, repo) |
| 31 | } |
| 32 | |
| 33 | func TestGitHubRepo_success(t *testing.T) { |
| 34 | httpReg := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected