@@ -14,7 +14,7 @@ import (
1414 "github.com/google/go-cmp/cmp"
1515)
1616
17- func TestOrganizationsService_GetAllRepositoryRulesets (t * testing.T ) {
17+ func TestOrganizationsService_ListAllRepositoryRulesets (t * testing.T ) {
1818 t .Parallel ()
1919 client , mux , _ := setup (t )
2020
@@ -38,9 +38,9 @@ func TestOrganizationsService_GetAllRepositoryRulesets(t *testing.T) {
3838 })
3939
4040 ctx := t .Context ()
41- rulesets , _ , err := client .Organizations .GetAllRepositoryRulesets (ctx , "o" , nil )
41+ rulesets , _ , err := client .Organizations .ListAllRepositoryRulesets (ctx , "o" , nil )
4242 if err != nil {
43- t .Errorf ("Organizations.GetAllRepositoryRulesets returned error: %v" , err )
43+ t .Errorf ("Organizations.ListAllRepositoryRulesets returned error: %v" , err )
4444 }
4545
4646 want := []* RepositoryRuleset {{
@@ -56,20 +56,20 @@ func TestOrganizationsService_GetAllRepositoryRulesets(t *testing.T) {
5656 },
5757 }}
5858 if ! cmp .Equal (rulesets , want ) {
59- t .Errorf ("Organizations.GetAllRepositoryRulesets returned %+v, want %+v" , rulesets , want )
59+ t .Errorf ("Organizations.ListAllRepositoryRulesets returned %+v, want %+v" , rulesets , want )
6060 }
6161
62- const methodName = "GetAllRepositoryRulesets "
62+ const methodName = "ListAllRepositoryRulesets "
6363 testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
64- got , resp , err := client .Organizations .GetAllRepositoryRulesets (ctx , "o" , nil )
64+ got , resp , err := client .Organizations .ListAllRepositoryRulesets (ctx , "o" , nil )
6565 if got != nil {
6666 t .Errorf ("testNewRequestAndDoFailure %v = %#v, want nil" , methodName , got )
6767 }
6868 return resp , err
6969 })
7070}
7171
72- func TestOrganizationsService_GetAllRepositoryRulesets_ListOptions (t * testing.T ) {
72+ func TestOrganizationsService_ListAllRepositoryRulesets_ListOptions (t * testing.T ) {
7373 t .Parallel ()
7474 client , mux , _ := setup (t )
7575
@@ -86,26 +86,26 @@ func TestOrganizationsService_GetAllRepositoryRulesets_ListOptions(t *testing.T)
8686
8787 opts := & ListOptions {Page : 2 , PerPage : 35 }
8888 ctx := t .Context ()
89- rulesets , _ , err := client .Organizations .GetAllRepositoryRulesets (ctx , "o" , opts )
89+ rulesets , _ , err := client .Organizations .ListAllRepositoryRulesets (ctx , "o" , opts )
9090 if err != nil {
91- t .Errorf ("Organizations.GetAllRepositoryRulesets returned error: %v" , err )
91+ t .Errorf ("Organizations.ListAllRepositoryRulesets returned error: %v" , err )
9292 }
9393
9494 want := []* RepositoryRuleset {{
9595 ID : Ptr (int64 (21 )),
9696 }}
9797 if ! cmp .Equal (rulesets , want ) {
98- t .Errorf ("Organizations.GetAllRepositoryRulesets returned %+v, want %+v" , rulesets , want )
98+ t .Errorf ("Organizations.ListAllRepositoryRulesets returned %+v, want %+v" , rulesets , want )
9999 }
100100
101- const methodName = "GetAllRepositoryRulesets "
101+ const methodName = "ListAllRepositoryRulesets "
102102 testBadOptions (t , methodName , func () (err error ) {
103- _ , _ , err = client .Organizations .GetAllRepositoryRulesets (ctx , "\n " , opts )
103+ _ , _ , err = client .Organizations .ListAllRepositoryRulesets (ctx , "\n " , opts )
104104 return err
105105 })
106106
107107 testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
108- got , resp , err := client .Organizations .GetAllRepositoryRulesets (ctx , "o" , opts )
108+ got , resp , err := client .Organizations .ListAllRepositoryRulesets (ctx , "o" , opts )
109109 if got != nil {
110110 t .Errorf ("testNewRequestAndDoFailure %v = %#v, want nil" , methodName , got )
111111 }
0 commit comments