Fix test
This commit is contained in:
parent
f0e6ec2b5e
commit
761d29cf5e
2 changed files with 60 additions and 24 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
78
test/fixtures/issueList.json
vendored
78
test/fixtures/issueList.json
vendored
|
|
@ -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 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue