@@ -40,6 +40,20 @@ func TestOrganizationsService_ListOutsideCollaborators(t *testing.T) {
4040if ! reflect .DeepEqual (members , want ) {
4141t .Errorf ("Organizations.ListOutsideCollaborators returned %+v, want %+v" , members , want )
4242}
43+
44+ const methodName = "ListOutsideCollaborators"
45+ testBadOptions (t , methodName , func () (err error ) {
46+ _ , _ , err = client .Organizations .ListOutsideCollaborators (ctx , "\n " , opt )
47+ return err
48+ })
49+
50+ testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
51+ got , resp , err := client .Organizations .ListOutsideCollaborators (ctx , "o" , opt )
52+ if got != nil {
53+ t .Errorf ("testNewRequestAndDoFailure %v = %#v, want nil" , methodName , got )
54+ }
55+ return resp , err
56+ })
4357}
4458
4559func TestOrganizationsService_ListOutsideCollaborators_invalidOrg (t * testing.T ) {
@@ -65,6 +79,16 @@ func TestOrganizationsService_RemoveOutsideCollaborator(t *testing.T) {
6579if err != nil {
6680t .Errorf ("Organizations.RemoveOutsideCollaborator returned error: %v" , err )
6781}
82+
83+ const methodName = "RemoveOutsideCollaborator"
84+ testBadOptions (t , methodName , func () (err error ) {
85+ _ , err = client .Organizations .RemoveOutsideCollaborator (ctx , "\n " , "\n " )
86+ return err
87+ })
88+
89+ testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
90+ return client .Organizations .RemoveOutsideCollaborator (ctx , "o" , "u" )
91+ })
6892}
6993
7094func TestOrganizationsService_RemoveOutsideCollaborator_NonMember (t * testing.T ) {
@@ -119,6 +143,16 @@ func TestOrganizationsService_ConvertMemberToOutsideCollaborator(t *testing.T) {
119143if err != nil {
120144t .Errorf ("Organizations.ConvertMemberToOutsideCollaborator returned error: %v" , err )
121145}
146+
147+ const methodName = "ConvertMemberToOutsideCollaborator"
148+ testBadOptions (t , methodName , func () (err error ) {
149+ _ , err = client .Organizations .ConvertMemberToOutsideCollaborator (ctx , "\n " , "\n " )
150+ return err
151+ })
152+
153+ testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
154+ return client .Organizations .ConvertMemberToOutsideCollaborator (ctx , "o" , "u" )
155+ })
122156}
123157
124158func TestOrganizationsService_ConvertMemberToOutsideCollaborator_NonMemberOrLastOwner (t * testing.T ) {
0 commit comments