File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -282,6 +282,29 @@ func TestIssueList_web(t *testing.T) {
282282 eq (t , url , expectedURL )
283283}
284284
285+ func TestIssueList_milestoneNotFound (t * testing.T ) {
286+ initBlankContext ("" , "OWNER/REPO" , "master" )
287+ http := initFakeHTTP ()
288+ http .StubRepoResponse ("OWNER" , "REPO" )
289+ http .Register (
290+ httpmock .GraphQL (`query IssueList\b` ),
291+ httpmock .FileResponse ("../test/fixtures/issueList.json" ),
292+ )
293+ http .Register (
294+ httpmock .GraphQL (`query RepositoryMilestoneList\b` ),
295+ httpmock .StringResponse (`
296+ { "data": { "repository": { "milestones": {
297+ "nodes": [{ "title":"1.x", "id": "MDk6TWlsZXN0b25lMTIzNDU=" }],
298+ "pageInfo": { "hasNextPage": false }
299+ } } } }
300+ ` ))
301+
302+ _ , err := RunCommand ("issue list --milestone NotFound" )
303+ if err == nil || err .Error () != `no milestone found with title: "NotFound"` {
304+ t .Errorf ("error running command `issue list`: %v" , err )
305+ }
306+ }
307+
285308func TestIssueView_web (t * testing.T ) {
286309 initBlankContext ("" , "OWNER/REPO" , "master" )
287310 http := initFakeHTTP ()
You can’t perform that action at this time.
0 commit comments