diff --git a/command/issue_test.go b/command/issue_test.go index 4acc76f6e..be93304b6 100644 --- a/command/issue_test.go +++ b/command/issue_test.go @@ -35,7 +35,8 @@ func TestIssueStatus(t *testing.T) { for _, r := range expectedIssues { if !r.MatchString(output) { - t.Errorf("output did not match regexp /%s/", r) + t.Errorf("output did not match regexp /%s/\n> output\n%s\n", r, output) + return } } } @@ -61,7 +62,8 @@ func TestIssueList(t *testing.T) { for _, r := range expectedIssues { if !r.MatchString(output) { - t.Errorf("output did not match regexp /%s/", r) + t.Errorf("output did not match regexp /%s/\n> output\n%s\n", r, output) + return } } } diff --git a/test/fixtures/issueList.json b/test/fixtures/issueList.json index b249f1103..17e92c743 100644 --- a/test/fixtures/issueList.json +++ b/test/fixtures/issueList.json @@ -1,27 +1,61 @@ { "data": { - "issues": { - "edges": [ - { - "node": { - "number": 1, - "title": "number won" + "repository": { + "issues": { + "edges": [ + { + "node": { + "number": 1, + "title": "number won", + "url": "https://wow.com", + "labels": { + "edges": [ + { + "node": { + "name": "label" + } + } + ], + "totalCount": 1 + } + } + }, + { + "node": { + "number": 2, + "title": "number too", + "url": "https://wow.com", + "labels": { + "edges": [ + { + "node": { + "name": "label" + } + } + ], + "totalCount": 1 + } + } + }, + { + "node": { + "number": 4, + "title": "number fore", + "url": "https://wow.com", + "labels": { + "edges": [ + { + "node": { + "name": "label" + } + } + ], + "totalCount": 1 + } + } } - }, - { - "node": { - "number": 2, - "title": "number too" - } - }, - { - "node": { - "number": 4, - "title": "number fore" - } - } - ] - }, - "pageInfo": { "hasNextPage": false } + ] + } + } } }