diff --git a/api/queries_repo_test.go b/api/queries_repo_test.go index ad0e36864..2d2cb93ad 100644 --- a/api/queries_repo_test.go +++ b/api/queries_repo_test.go @@ -54,6 +54,14 @@ func Test_RepoMetadata(t *testing.T) { "pageInfo": { "hasNextPage": false } } } } } `)) + http.Register( + httpmock.REST("GET", "repos/OWNER/REPO/milestones"), + httpmock.StringResponse(` + [ + { "title": "GA", "id": 1 }, + { "title": "Big One.oh", "id": 2 } + ] + `)) http.Register( httpmock.GraphQL(`query RepositoryProjectList\b`), httpmock.StringResponse(` diff --git a/command/issue_test.go b/command/issue_test.go index 7e7532a1e..c88e71247 100644 --- a/command/issue_test.go +++ b/command/issue_test.go @@ -170,10 +170,13 @@ 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, "1.x", params["milestone"].(string)) 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("[]"), + ) output, err := RunCommand("issue list -a probablyCher -l web,bug -s open -A foo --mention me --milestone 1.x") if err != nil {