(t *testing.T)
| 1854 | } |
| 1855 | |
| 1856 | func TestIssueCreate_disabledIssues(t *testing.T) { |
| 1857 | http := &httpmock.Registry{} |
| 1858 | defer http.Verify(t) |
| 1859 | |
| 1860 | http.Register( |
| 1861 | httpmock.GraphQL(`query IssueRepositoryInfo\b`), |
| 1862 | httpmock.StringResponse(` |
| 1863 | { "data": { "repository": { |
| 1864 | "id": "REPOID", |
| 1865 | "hasIssuesEnabled": false |
| 1866 | } } }`), |
| 1867 | ) |
| 1868 | |
| 1869 | _, err := runCommand(http, true, `-t heres -b johnny`, nil) |
| 1870 | if err == nil || err.Error() != "the 'OWNER/REPO' repository has disabled issues" { |
| 1871 | t.Errorf("error running command `issue create`: %v", err) |
| 1872 | } |
| 1873 | } |
| 1874 | |
| 1875 | func TestIssueCreate_AtMeAssignee(t *testing.T) { |
| 1876 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected