File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -114,9 +114,9 @@ func TestIssueList_nontty(t *testing.T) {
114114 http := initFakeHTTP ()
115115 http .StubRepoResponse ("OWNER" , "REPO" )
116116
117- jsonFile , _ := os . Open ( "../test/fixtures/issueList.json" )
118- defer jsonFile . Close ()
119- http . StubResponse ( 200 , jsonFile )
117+ http . Register (
118+ httpmock . GraphQL ( `query IssueList\b` ),
119+ httpmock . FileResponse ( "../test/fixtures/issueList.json" ) )
120120
121121 output , err := RunCommand ("issue list" )
122122 if err != nil {
@@ -381,9 +381,7 @@ func TestIssueView_nontty_Preview(t *testing.T) {
381381 http := initFakeHTTP ()
382382 http .StubRepoResponse ("OWNER" , "REPO" )
383383
384- jsonFile , _ := os .Open (tc .fixture )
385- defer jsonFile .Close ()
386- http .StubResponse (200 , jsonFile )
384+ http .Register (httpmock .GraphQL (`query IssueByNumber\b` ), httpmock .FileResponse (tc .fixture ))
387385
388386 output , err := RunCommand (tc .command )
389387 if err != nil {
You can’t perform that action at this time.
0 commit comments