spec/integration/ip_messaging/v1/service/role_spec.rb in twilio-ruby-5.0.0.rc18 vs spec/integration/ip_messaging/v1/service/role_spec.rb in twilio-ruby-5.0.0.rc19

- old
+ new

@@ -1,22 +1,22 @@ ## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 -# / / +# / / require 'spec_helper.rb' describe 'Role' do it "can fetch" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) - + expect { @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .roles("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() }.to raise_exception(Twilio::REST::TwilioException) - + values = {} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'get', url: 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles/RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -39,29 +39,29 @@ "editOwnMessage", "deleteOwnMessage" ], "date_created": "2016-03-03T19:47:15Z", "date_updated": "2016-03-03T19:47:15Z", - "url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles/RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles/RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] )) - + actual = @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .roles("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() - + expect(actual).to_not eq(nil) end it "can delete" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) - + expect { @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .roles("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() }.to raise_exception(Twilio::REST::TwilioException) - + values = {} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'delete', url: 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles/RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -71,25 +71,25 @@ it "receives delete responses" do @holodeck.mock(Twilio::TwilioResponse.new( 204, nil, )) - + actual = @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .roles("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() - + expect(actual).to eq(true) end it "can create" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) - + expect { @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .roles.create(friendly_name: "friendly_name", type: "channel", permission: ['permission']) }.to raise_exception(Twilio::REST::TwilioException) - + values = { 'FriendlyName' => "friendly_name", 'Type' => "channel", 'Permission' => ['permission'], } @@ -117,29 +117,29 @@ "editOwnMessage", "deleteOwnMessage" ], "date_created": "2016-03-03T19:47:15Z", "date_updated": "2016-03-03T19:47:15Z", - "url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles/RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles/RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] )) - + actual = @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .roles.create(friendly_name: "friendly_name", type: "channel", permission: ['permission']) - + expect(actual).to_not eq(nil) end it "can read" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) - + expect { @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .roles.list() }.to raise_exception(Twilio::REST::TwilioException) - + values = {} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'get', url: 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles', @@ -151,14 +151,14 @@ 200, %q[ { "meta": { "page": 0, - "page_size": 1, - "first_page_url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles?PageSize=1&Page=0", + "page_size": 50, + "first_page_url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles?PageSize=50&Page=0", "previous_page_url": null, - "url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles?PageSize=1&Page=0", + "url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles?PageSize=50&Page=0", "next_page_url": null, "key": "roles" }, "roles": [ { @@ -173,56 +173,56 @@ "editOwnMessage", "deleteOwnMessage" ], "date_created": "2016-03-03T19:47:15Z", "date_updated": "2016-03-03T19:47:15Z", - "url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles/RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles/RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] } ] )) - + actual = @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .roles.list() - + expect(actual).to_not eq(nil) end it "receives read_empty responses" do @holodeck.mock(Twilio::TwilioResponse.new( 200, %q[ { "meta": { "page": 0, - "page_size": 1, - "first_page_url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles?PageSize=1&Page=0", + "page_size": 50, + "first_page_url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles?PageSize=50&Page=0", "previous_page_url": null, - "url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles?PageSize=1&Page=0", + "url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles?PageSize=50&Page=0", "next_page_url": null, "key": "roles" }, "roles": [] } ] )) - + actual = @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .roles.list() - + expect(actual).to_not eq(nil) end it "can update" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) - + expect { @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .roles("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(permission: ['permission']) }.to raise_exception(Twilio::REST::TwilioException) - + values = { 'Permission' => ['permission'], } expect( @holodeck.has_request?(Holodeck::Request.new( @@ -248,16 +248,16 @@ "editOwnMessage", "deleteOwnMessage" ], "date_created": "2016-03-03T19:47:15Z", "date_updated": "2016-03-03T19:47:15Z", - "url": "https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles/RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Roles/RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] )) - + actual = @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .roles("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(permission: ['permission']) - + expect(actual).to_not eq(nil) end end \ No newline at end of file