Skip to content

Commit 754dcb7

Browse files
committed
catch up to trunk
1 parent 9710766 commit 754dcb7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

command/issue_test.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)