(t *testing.T)
| 1871 | } |
| 1872 | |
| 1873 | func TestIssueCreate_disabledIssues(t *testing.T) { |
| 1874 | http := &httpmock.Registry{} |
| 1875 | defer http.Verify(t) |
| 1876 | |
| 1877 | http.Register( |
| 1878 | httpmock.GraphQL(`query IssueRepositoryInfo\b`), |
| 1879 | httpmock.StringResponse(` |
| 1880 | { "data": { "repository": { |
| 1881 | "id": "REPOID", |
| 1882 | "hasIssuesEnabled": false |
| 1883 | } } }`), |
| 1884 | ) |
| 1885 | |
| 1886 | _, err := runCommand(http, true, `-t heres -b johnny`, nil) |
| 1887 | if err == nil || err.Error() != "the 'OWNER/REPO' repository has disabled issues" { |
| 1888 | t.Errorf("error running command `issue create`: %v", err) |
| 1889 | } |
| 1890 | } |
| 1891 | |
| 1892 | func TestIssueCreate_AtMeAssignee(t *testing.T) { |
| 1893 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected