(t *testing.T)
| 98 | } |
| 99 | |
| 100 | func TestPRList_nontty(t *testing.T) { |
| 101 | http := initFakeHTTP() |
| 102 | defer http.Verify(t) |
| 103 | |
| 104 | http.Register(httpmock.GraphQL(`query PullRequestList\b`), httpmock.FileResponse("./fixtures/prList.json")) |
| 105 | |
| 106 | output, err := runCommand(http, nil, false, "") |
| 107 | if err != nil { |
| 108 | t.Fatal(err) |
| 109 | } |
| 110 | |
| 111 | assert.Equal(t, "", output.Stderr()) |
| 112 | |
| 113 | assert.Equal(t, `32 New feature feature DRAFT 2022-08-24T20:01:12Z |
| 114 | 29 Fixed bad bug hubot:bug-fix OPEN 2022-07-20T19:01:12Z |
| 115 | 28 Improve documentation docs MERGED 2020-01-26T19:01:12Z |
| 116 | `, output.String()) |
| 117 | } |
| 118 | |
| 119 | func TestPRList_filtering(t *testing.T) { |
| 120 | http := initFakeHTTP() |
nothing calls this directly
no test coverage detected