@@ -22,7 +22,7 @@ func TestSecretScanningService_ListAlertsForEnterprise(t *testing.T) {
2222
2323 mux .HandleFunc ("/enterprises/e/secret-scanning/alerts" , func (w http.ResponseWriter , r * http.Request ) {
2424 testMethod (t , r , "GET" )
25- testFormValues (t , r , values {"state" : "open" , "secret_type" : "mailchimp_api_key" })
25+ testFormValues (t , r , values {"state" : "open" , "secret_type" : "mailchimp_api_key" , "sort" : "updated" , "direction" : "asc" })
2626
2727 fmt .Fprint (w , `[{
2828 "number": 1,
@@ -45,7 +45,7 @@ func TestSecretScanningService_ListAlertsForEnterprise(t *testing.T) {
4545 })
4646
4747 ctx := context .Background ()
48- opts := & SecretScanningAlertListOptions {State : "open" , SecretType : "mailchimp_api_key" }
48+ opts := & SecretScanningAlertListOptions {State : "open" , SecretType : "mailchimp_api_key" , Direction : "asc" , Sort : "updated" }
4949
5050 alerts , _ , err := client .SecretScanning .ListAlertsForEnterprise (ctx , "e" , opts )
5151 if err != nil {
@@ -97,7 +97,7 @@ func TestSecretScanningService_ListAlertsForOrg(t *testing.T) {
9797
9898 mux .HandleFunc ("/orgs/o/secret-scanning/alerts" , func (w http.ResponseWriter , r * http.Request ) {
9999 testMethod (t , r , "GET" )
100- testFormValues (t , r , values {"state" : "open" , "secret_type" : "mailchimp_api_key" })
100+ testFormValues (t , r , values {"state" : "open" , "secret_type" : "mailchimp_api_key" , "sort" : "updated" , "direction" : "asc" })
101101
102102 fmt .Fprint (w , `[{
103103 "number": 1,
@@ -115,7 +115,7 @@ func TestSecretScanningService_ListAlertsForOrg(t *testing.T) {
115115 })
116116
117117 ctx := context .Background ()
118- opts := & SecretScanningAlertListOptions {State : "open" , SecretType : "mailchimp_api_key" }
118+ opts := & SecretScanningAlertListOptions {State : "open" , SecretType : "mailchimp_api_key" , Direction : "asc" , Sort : "updated" }
119119
120120 alerts , _ , err := client .SecretScanning .ListAlertsForOrg (ctx , "o" , opts )
121121 if err != nil {
@@ -162,7 +162,7 @@ func TestSecretScanningService_ListAlertsForOrgListOptions(t *testing.T) {
162162
163163 mux .HandleFunc ("/orgs/o/secret-scanning/alerts" , func (w http.ResponseWriter , r * http.Request ) {
164164 testMethod (t , r , "GET" )
165- testFormValues (t , r , values {"state" : "open" , "secret_type" : "mailchimp_api_key" , "per_page" : "1" , "page" : "1" })
165+ testFormValues (t , r , values {"state" : "open" , "secret_type" : "mailchimp_api_key" , "per_page" : "1" , "page" : "1" , "sort" : "updated" , "direction" : "asc" })
166166
167167 fmt .Fprint (w , `[{
168168 "number": 1,
@@ -182,7 +182,7 @@ func TestSecretScanningService_ListAlertsForOrgListOptions(t *testing.T) {
182182 ctx := context .Background ()
183183
184184 // Testing pagination by index
185- opts := & SecretScanningAlertListOptions {State : "open" , SecretType : "mailchimp_api_key" , ListOptions : ListOptions {Page : 1 , PerPage : 1 }}
185+ opts := & SecretScanningAlertListOptions {State : "open" , SecretType : "mailchimp_api_key" , ListOptions : ListOptions {Page : 1 , PerPage : 1 }, Direction : "asc" , Sort : "updated" }
186186
187187 alerts , _ , err := client .SecretScanning .ListAlertsForOrg (ctx , "o" , opts )
188188 if err != nil {
@@ -229,7 +229,7 @@ func TestSecretScanningService_ListAlertsForRepo(t *testing.T) {
229229
230230 mux .HandleFunc ("/repos/o/r/secret-scanning/alerts" , func (w http.ResponseWriter , r * http.Request ) {
231231 testMethod (t , r , "GET" )
232- testFormValues (t , r , values {"state" : "open" , "secret_type" : "mailchimp_api_key" })
232+ testFormValues (t , r , values {"state" : "open" , "secret_type" : "mailchimp_api_key" , "sort" : "updated" , "direction" : "asc" })
233233
234234 fmt .Fprint (w , `[{
235235 "number": 1,
@@ -247,7 +247,7 @@ func TestSecretScanningService_ListAlertsForRepo(t *testing.T) {
247247 })
248248
249249 ctx := context .Background ()
250- opts := & SecretScanningAlertListOptions {State : "open" , SecretType : "mailchimp_api_key" }
250+ opts := & SecretScanningAlertListOptions {State : "open" , SecretType : "mailchimp_api_key" , Direction : "asc" , Sort : "updated" }
251251
252252 alerts , _ , err := client .SecretScanning .ListAlertsForRepo (ctx , "o" , "r" , opts )
253253 if err != nil {
0 commit comments