(t *testing.T)
| 165 | } |
| 166 | |
| 167 | func TestIssueList_tty_withFlags(t *testing.T) { |
| 168 | http := &httpmock.Registry{} |
| 169 | defer http.Verify(t) |
| 170 | |
| 171 | http.Register( |
| 172 | httpmock.GraphQL(`query IssueList\b`), |
| 173 | httpmock.GraphQLQuery(` |
| 174 | { "data": { "repository": { |
| 175 | "hasIssuesEnabled": true, |
| 176 | "issues": { "nodes": [] } |
| 177 | } } }`, func(_ string, params map[string]interface{}) { |
| 178 | assert.Equal(t, "probablyCher", params["assignee"].(string)) |
| 179 | assert.Equal(t, "foo", params["author"].(string)) |
| 180 | assert.Equal(t, "me", params["mention"].(string)) |
| 181 | assert.Equal(t, []interface{}{"OPEN"}, params["states"].([]interface{})) |
| 182 | })) |
| 183 | |
| 184 | output, err := runCommand(http, true, "-a probablyCher -s open -A foo --mention me") |
| 185 | assert.EqualError(t, err, "no issues match your search in OWNER/REPO") |
| 186 | |
| 187 | assert.Equal(t, "", output.String()) |
| 188 | assert.Equal(t, "", output.Stderr()) |
| 189 | } |
| 190 | |
| 191 | func TestIssueList_tty_withAppFlag(t *testing.T) { |
| 192 | http := &httpmock.Registry{} |
nothing calls this directly
no test coverage detected