diff --git a/command/issue_test.go b/command/issue_test.go index c88e71247..734703b35 100644 --- a/command/issue_test.go +++ b/command/issue_test.go @@ -170,13 +170,18 @@ func TestIssueList_tty_withFlags(t *testing.T) { assert.Equal(t, "probablyCher", params["assignee"].(string)) assert.Equal(t, "foo", params["author"].(string)) assert.Equal(t, "me", params["mention"].(string)) + assert.Equal(t, "12345", params["milestone"].(string)) // Database ID for the Milestone (see #1441) assert.Equal(t, []interface{}{"web", "bug"}, params["labels"].([]interface{})) assert.Equal(t, []interface{}{"OPEN"}, params["states"].([]interface{})) })) http.Register( - httpmock.REST("GET", "repos/OWNER/REPO/milestones"), - httpmock.StringResponse("[]"), - ) + httpmock.GraphQL(`query RepositoryMilestoneList\b`), + httpmock.StringResponse(` + { "data": { "repository": { "milestones": { + "nodes": [{ "title":"1.x", "id": "MDk6TWlsZXN0b25lMTIzNDU=" }], + "pageInfo": { "hasNextPage": false } + } } } } + `)) output, err := RunCommand("issue list -a probablyCher -l web,bug -s open -A foo --mention me --milestone 1.x") if err != nil {