@@ -19,7 +19,7 @@ func Test_listPullRequests(t *testing.T) {
1919 tests := []struct {
2020 name string
2121 args args
22- httpStub func (* httpmock.Registry )
22+ httpStub func (* testing. T , * httpmock.Registry )
2323 wantErr bool
2424 }{
2525 {
@@ -31,7 +31,7 @@ func Test_listPullRequests(t *testing.T) {
3131 State : "open" ,
3232 },
3333 },
34- httpStub : func (r * httpmock.Registry ) {
34+ httpStub : func (t * testing. T , r * httpmock.Registry ) {
3535 r .Register (
3636 httpmock .GraphQL (`query PullRequestList\b` ),
3737 httpmock .GraphQLQuery (`{"data":{}}` , func (query string , vars map [string ]interface {}) {
@@ -56,7 +56,7 @@ func Test_listPullRequests(t *testing.T) {
5656 State : "closed" ,
5757 },
5858 },
59- httpStub : func (r * httpmock.Registry ) {
59+ httpStub : func (t * testing. T , r * httpmock.Registry ) {
6060 r .Register (
6161 httpmock .GraphQL (`query PullRequestList\b` ),
6262 httpmock .GraphQLQuery (`{"data":{}}` , func (query string , vars map [string ]interface {}) {
@@ -82,12 +82,12 @@ func Test_listPullRequests(t *testing.T) {
8282 Labels : []string {"hello" , "one world" },
8383 },
8484 },
85- httpStub : func (r * httpmock.Registry ) {
85+ httpStub : func (t * testing. T , r * httpmock.Registry ) {
8686 r .Register (
8787 httpmock .GraphQL (`query PullRequestSearch\b` ),
8888 httpmock .GraphQLQuery (`{"data":{}}` , func (query string , vars map [string ]interface {}) {
8989 want := map [string ]interface {}{
90- "q" : `repo:OWNER/REPO is:pr is:open label:hello label:"one world" sort:created-desc ` ,
90+ "q" : `repo:OWNER/REPO is:pr is:open label:hello label:"one world"` ,
9191 "limit" : float64 (30 ),
9292 }
9393 if ! reflect .DeepEqual (vars , want ) {
@@ -106,7 +106,7 @@ func Test_listPullRequests(t *testing.T) {
106106 Author : "monalisa" ,
107107 },
108108 },
109- httpStub : func (r * httpmock.Registry ) {
109+ httpStub : func (t * testing. T , r * httpmock.Registry ) {
110110 r .Register (
111111 httpmock .GraphQL (`query PullRequestSearch\b` ),
112112 httpmock .GraphQLQuery (`{"data":{}}` , func (query string , vars map [string ]interface {}) {
@@ -130,7 +130,7 @@ func Test_listPullRequests(t *testing.T) {
130130 Search : "one world in:title" ,
131131 },
132132 },
133- httpStub : func (r * httpmock.Registry ) {
133+ httpStub : func (t * testing. T , r * httpmock.Registry ) {
134134 r .Register (
135135 httpmock .GraphQL (`query PullRequestSearch\b` ),
136136 httpmock .GraphQLQuery (`{"data":{}}` , func (query string , vars map [string ]interface {}) {
@@ -149,7 +149,7 @@ func Test_listPullRequests(t *testing.T) {
149149 t .Run (tt .name , func (t * testing.T ) {
150150 reg := & httpmock.Registry {}
151151 if tt .httpStub != nil {
152- tt .httpStub (reg )
152+ tt .httpStub (t , reg )
153153 }
154154 httpClient := & http.Client {Transport : reg }
155155
0 commit comments