@@ -34,6 +34,20 @@ func TestInteractionsService_GetRestrictionsForOrgs(t *testing.T) {
3434if ! reflect .DeepEqual (organizationInteractions , want ) {
3535t .Errorf ("Interactions.GetRestrictionsForOrg returned %+v, want %+v" , organizationInteractions , want )
3636}
37+
38+ const methodName = "GetRestrictionsForOrg"
39+ testBadOptions (t , methodName , func () (err error ) {
40+ _ , _ , err = client .Interactions .GetRestrictionsForOrg (ctx , "\n " )
41+ return err
42+ })
43+
44+ testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
45+ got , resp , err := client .Interactions .GetRestrictionsForOrg (ctx , "o" )
46+ if got != nil {
47+ t .Errorf ("testNewRequestAndDoFailure %v = %#v, want nil" , methodName , got )
48+ }
49+ return resp , err
50+ })
3751}
3852
3953func TestInteractionsService_UpdateRestrictionsForOrg (t * testing.T ) {
@@ -64,6 +78,20 @@ func TestInteractionsService_UpdateRestrictionsForOrg(t *testing.T) {
6478if ! reflect .DeepEqual (organizationInteractions , want ) {
6579t .Errorf ("Interactions.UpdateRestrictionsForOrg returned %+v, want %+v" , organizationInteractions , want )
6680}
81+
82+ const methodName = "UpdateRestrictionsForOrg"
83+ testBadOptions (t , methodName , func () (err error ) {
84+ _ , _ , err = client .Interactions .UpdateRestrictionsForOrg (ctx , "\n " , input .GetLimit ())
85+ return err
86+ })
87+
88+ testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
89+ got , resp , err := client .Interactions .UpdateRestrictionsForOrg (ctx , "o" , input .GetLimit ())
90+ if got != nil {
91+ t .Errorf ("testNewRequestAndDoFailure %v = %#v, want nil" , methodName , got )
92+ }
93+ return resp , err
94+ })
6795}
6896
6997func TestInteractionsService_RemoveRestrictionsFromOrg (t * testing.T ) {
@@ -80,4 +108,14 @@ func TestInteractionsService_RemoveRestrictionsFromOrg(t *testing.T) {
80108if err != nil {
81109t .Errorf ("Interactions.RemoveRestrictionsFromOrg returned error: %v" , err )
82110}
111+
112+ const methodName = "RemoveRestrictionsFromOrg"
113+ testBadOptions (t , methodName , func () (err error ) {
114+ _ , err = client .Interactions .RemoveRestrictionsFromOrg (ctx , "\n " )
115+ return err
116+ })
117+
118+ testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
119+ return client .Interactions .RemoveRestrictionsFromOrg (ctx , "o" )
120+ })
83121}
0 commit comments