@@ -79,7 +79,7 @@ func TestReactionsService_ListCommentReactions(t *testing.T) {
7979 fmt .Fprint (w , `[{"id":1,"user":{"login":"l","id":2},"content":"+1"}]` )
8080 })
8181
82- opt := & ListCommentReactionOptions {Content : "+1" }
82+ opt := & ListReactionOptions {Content : "+1" }
8383 ctx := context .Background ()
8484 reactions , _ , err := client .Reactions .ListCommentReactions (ctx , "o" , "r" , 1 , opt )
8585 if err != nil {
@@ -149,13 +149,15 @@ func TestReactionsService_ListIssueReactions(t *testing.T) {
149149 mux .HandleFunc ("/repos/o/r/issues/1/reactions" , func (w http.ResponseWriter , r * http.Request ) {
150150 testMethod (t , r , "GET" )
151151 testHeader (t , r , "Accept" , mediaTypeReactionsPreview )
152+ testFormValues (t , r , values {"content" : "+1" })
152153
153154 w .WriteHeader (http .StatusOK )
154155 assertWrite (t , w , []byte (`[{"id":1,"user":{"login":"l","id":2},"content":"+1"}]` ))
155156 })
156157
158+ opt := & ListReactionOptions {Content : "+1" }
157159 ctx := context .Background ()
158- got , _ , err := client .Reactions .ListIssueReactions (ctx , "o" , "r" , 1 , nil )
160+ got , _ , err := client .Reactions .ListIssueReactions (ctx , "o" , "r" , 1 , opt )
159161 if err != nil {
160162 t .Errorf ("ListIssueReactions returned error: %v" , err )
161163 }
@@ -173,7 +175,7 @@ func TestReactionsService_ListIssueReactions_coverage(t *testing.T) {
173175
174176 const methodName = "ListIssueReactions"
175177 testBadOptions (t , methodName , func () (err error ) {
176- _ , _ , err = client .Reactions .ListIssueReactions (ctx , "\n " , "\n " , - 1 , & ListOptions {})
178+ _ , _ , err = client .Reactions .ListIssueReactions (ctx , "\n " , "\n " , - 1 , & ListReactionOptions {})
177179 return err
178180 })
179181
@@ -230,13 +232,15 @@ func TestReactionsService_ListIssueCommentReactions(t *testing.T) {
230232 mux .HandleFunc ("/repos/o/r/issues/comments/1/reactions" , func (w http.ResponseWriter , r * http.Request ) {
231233 testMethod (t , r , "GET" )
232234 testHeader (t , r , "Accept" , mediaTypeReactionsPreview )
235+ testFormValues (t , r , values {"content" : "+1" })
233236
234237 w .WriteHeader (http .StatusOK )
235238 assertWrite (t , w , []byte (`[{"id":1,"user":{"login":"l","id":2},"content":"+1"}]` ))
236239 })
237240
241+ opt := & ListReactionOptions {Content : "+1" }
238242 ctx := context .Background ()
239- got , _ , err := client .Reactions .ListIssueCommentReactions (ctx , "o" , "r" , 1 , nil )
243+ got , _ , err := client .Reactions .ListIssueCommentReactions (ctx , "o" , "r" , 1 , opt )
240244 if err != nil {
241245 t .Errorf ("ListIssueCommentReactions returned error: %v" , err )
242246 }
@@ -254,7 +258,7 @@ func TestReactionsService_ListIssueCommentReactions_coverage(t *testing.T) {
254258
255259 const methodName = "ListIssueCommentReactions"
256260 testBadOptions (t , methodName , func () (err error ) {
257- _ , _ , err = client .Reactions .ListIssueCommentReactions (ctx , "\n " , "\n " , - 1 , & ListOptions {})
261+ _ , _ , err = client .Reactions .ListIssueCommentReactions (ctx , "\n " , "\n " , - 1 , & ListReactionOptions {})
258262 return err
259263 })
260264
@@ -311,13 +315,15 @@ func TestReactionsService_ListPullRequestCommentReactions(t *testing.T) {
311315 mux .HandleFunc ("/repos/o/r/pulls/comments/1/reactions" , func (w http.ResponseWriter , r * http.Request ) {
312316 testMethod (t , r , "GET" )
313317 testHeader (t , r , "Accept" , mediaTypeReactionsPreview )
318+ testFormValues (t , r , values {"content" : "+1" })
314319
315320 w .WriteHeader (http .StatusOK )
316321 assertWrite (t , w , []byte (`[{"id":1,"user":{"login":"l","id":2},"content":"+1"}]` ))
317322 })
318323
324+ opt := & ListReactionOptions {Content : "+1" }
319325 ctx := context .Background ()
320- got , _ , err := client .Reactions .ListPullRequestCommentReactions (ctx , "o" , "r" , 1 , nil )
326+ got , _ , err := client .Reactions .ListPullRequestCommentReactions (ctx , "o" , "r" , 1 , opt )
321327 if err != nil {
322328 t .Errorf ("ListPullRequestCommentReactions returned error: %v" , err )
323329 }
@@ -335,7 +341,7 @@ func TestReactionsService_ListPullRequestCommentReactions_coverage(t *testing.T)
335341
336342 const methodName = "ListPullRequestCommentReactions"
337343 testBadOptions (t , methodName , func () (err error ) {
338- _ , _ , err = client .Reactions .ListPullRequestCommentReactions (ctx , "\n " , "\n " , - 1 , & ListOptions {})
344+ _ , _ , err = client .Reactions .ListPullRequestCommentReactions (ctx , "\n " , "\n " , - 1 , & ListReactionOptions {})
339345 return err
340346 })
341347
@@ -392,13 +398,15 @@ func TestReactionsService_ListTeamDiscussionReactions(t *testing.T) {
392398 mux .HandleFunc ("/teams/1/discussions/2/reactions" , func (w http.ResponseWriter , r * http.Request ) {
393399 testMethod (t , r , "GET" )
394400 testHeader (t , r , "Accept" , mediaTypeReactionsPreview )
401+ testFormValues (t , r , values {"content" : "+1" })
395402
396403 w .WriteHeader (http .StatusOK )
397404 assertWrite (t , w , []byte (`[{"id":1,"user":{"login":"l","id":2},"content":"+1"}]` ))
398405 })
399406
407+ opt := & ListReactionOptions {Content : "+1" }
400408 ctx := context .Background ()
401- got , _ , err := client .Reactions .ListTeamDiscussionReactions (ctx , 1 , 2 , nil )
409+ got , _ , err := client .Reactions .ListTeamDiscussionReactions (ctx , 1 , 2 , opt )
402410 if err != nil {
403411 t .Errorf ("ListTeamDiscussionReactions returned error: %v" , err )
404412 }
@@ -416,7 +424,7 @@ func TestReactionsService_ListTeamDiscussionReactions_coverage(t *testing.T) {
416424
417425 const methodName = "ListTeamDiscussionReactions"
418426 testBadOptions (t , methodName , func () (err error ) {
419- _ , _ , err = client .Reactions .ListTeamDiscussionReactions (ctx , - 1 , - 2 , & ListOptions {})
427+ _ , _ , err = client .Reactions .ListTeamDiscussionReactions (ctx , - 1 , - 2 , & ListReactionOptions {})
420428 return err
421429 })
422430
@@ -473,13 +481,15 @@ func TestReactionService_ListTeamDiscussionCommentReactions(t *testing.T) {
473481 mux .HandleFunc ("/teams/1/discussions/2/comments/3/reactions" , func (w http.ResponseWriter , r * http.Request ) {
474482 testMethod (t , r , "GET" )
475483 testHeader (t , r , "Accept" , mediaTypeReactionsPreview )
484+ testFormValues (t , r , values {"content" : "+1" })
476485
477486 w .WriteHeader (http .StatusOK )
478487 assertWrite (t , w , []byte (`[{"id":1,"user":{"login":"l","id":2},"content":"+1"}]` ))
479488 })
480489
490+ opt := & ListReactionOptions {Content : "+1" }
481491 ctx := context .Background ()
482- got , _ , err := client .Reactions .ListTeamDiscussionCommentReactions (ctx , 1 , 2 , 3 , nil )
492+ got , _ , err := client .Reactions .ListTeamDiscussionCommentReactions (ctx , 1 , 2 , 3 , opt )
483493 if err != nil {
484494 t .Errorf ("ListTeamDiscussionCommentReactions returned error: %v" , err )
485495 }
@@ -497,7 +507,7 @@ func TestReactionService_ListTeamDiscussionCommentReactions_coverage(t *testing.
497507
498508 const methodName = "ListTeamDiscussionCommentReactions"
499509 testBadOptions (t , methodName , func () (err error ) {
500- _ , _ , err = client .Reactions .ListTeamDiscussionCommentReactions (ctx , - 1 , - 2 , - 3 , & ListOptions {})
510+ _ , _ , err = client .Reactions .ListTeamDiscussionCommentReactions (ctx , - 1 , - 2 , - 3 , & ListReactionOptions {})
501511 return err
502512 })
503513
0 commit comments