Skip to content

Commit 75e8cb8

Browse files
committed
register mocks for the new request
1 parent 3ce1de6 commit 75e8cb8

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

api/queries_repo_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ func Test_RepoMetadata(t *testing.T) {
5454
"pageInfo": { "hasNextPage": false }
5555
} } } }
5656
`))
57+
http.Register(
58+
httpmock.REST("GET", "repos/OWNER/REPO/milestones"),
59+
httpmock.StringResponse(`
60+
[
61+
{ "title": "GA", "id": 1 },
62+
{ "title": "Big One.oh", "id": 2 }
63+
]
64+
`))
5765
http.Register(
5866
httpmock.GraphQL(`query RepositoryProjectList\b`),
5967
httpmock.StringResponse(`

command/issue_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,13 @@ func TestIssueList_tty_withFlags(t *testing.T) {
170170
assert.Equal(t, "probablyCher", params["assignee"].(string))
171171
assert.Equal(t, "foo", params["author"].(string))
172172
assert.Equal(t, "me", params["mention"].(string))
173-
assert.Equal(t, "1.x", params["milestone"].(string))
174173
assert.Equal(t, []interface{}{"web", "bug"}, params["labels"].([]interface{}))
175174
assert.Equal(t, []interface{}{"OPEN"}, params["states"].([]interface{}))
176175
}))
176+
http.Register(
177+
httpmock.REST("GET", "repos/OWNER/REPO/milestones"),
178+
httpmock.StringResponse("[]"),
179+
)
177180

178181
output, err := RunCommand("issue list -a probablyCher -l web,bug -s open -A foo --mention me --milestone 1.x")
179182
if err != nil {

0 commit comments

Comments
 (0)