spec/integration/chat/v2/service/channel/message_spec.rb in twilio-ruby-5.6.3 vs spec/integration/chat/v2/service/channel/message_spec.rb in twilio-ruby-5.6.4

- old
+ new

@@ -9,13 +9,13 @@ describe 'Message' do it "can fetch" do @holodeck.mock(Twilio::Response.new(500, '')) expect { - @client.chat.v2.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .messages("IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() + @client.chat.v2.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .messages('IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa').fetch() }.to raise_exception(Twilio::REST::TwilioError) values = {} expect( @holodeck.has_request?(Holodeck::Request.new( @@ -47,13 +47,13 @@ "url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] )) - actual = @client.chat.v2.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .messages("IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() + actual = @client.chat.v2.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .messages('IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa').fetch() expect(actual).to_not eq(nil) end it "receives fetch_media responses" do @@ -84,23 +84,23 @@ "url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] )) - actual = @client.chat.v2.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .messages("IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() + actual = @client.chat.v2.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .messages('IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa').fetch() expect(actual).to_not eq(nil) end it "can create" do @holodeck.mock(Twilio::Response.new(500, '')) expect { - @client.chat.v2.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + @client.chat.v2.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ .messages.create() }.to raise_exception(Twilio::REST::TwilioError) values = {} expect( @@ -133,12 +133,12 @@ "url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] )) - actual = @client.chat.v2.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + actual = @client.chat.v2.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ .messages.create() expect(actual).to_not eq(nil) end @@ -165,12 +165,12 @@ "url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] )) - actual = @client.chat.v2.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + actual = @client.chat.v2.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ .messages.create() expect(actual).to_not eq(nil) end @@ -202,23 +202,23 @@ "url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] )) - actual = @client.chat.v2.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + actual = @client.chat.v2.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ .messages.create() expect(actual).to_not eq(nil) end it "can read" do @holodeck.mock(Twilio::Response.new(500, '')) expect { - @client.chat.v2.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + @client.chat.v2.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ .messages.list() }.to raise_exception(Twilio::REST::TwilioError) values = {} expect( @@ -287,12 +287,12 @@ ] } ] )) - actual = @client.chat.v2.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + actual = @client.chat.v2.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ .messages.list() expect(actual).to_not eq(nil) end @@ -313,24 +313,24 @@ "messages": [] } ] )) - actual = @client.chat.v2.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + actual = @client.chat.v2.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ .messages.list() expect(actual).to_not eq(nil) end it "can delete" do @holodeck.mock(Twilio::Response.new(500, '')) expect { - @client.chat.v2.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .messages("IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() + @client.chat.v2.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .messages('IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa').delete() }.to raise_exception(Twilio::REST::TwilioError) values = {} expect( @holodeck.has_request?(Holodeck::Request.new( @@ -343,24 +343,24 @@ @holodeck.mock(Twilio::Response.new( 204, nil, )) - actual = @client.chat.v2.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .messages("IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() + actual = @client.chat.v2.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .messages('IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa').delete() expect(actual).to eq(true) end it "can update" do @holodeck.mock(Twilio::Response.new(500, '')) expect { - @client.chat.v2.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .messages("IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update() + @client.chat.v2.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .messages('IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa').update() }.to raise_exception(Twilio::REST::TwilioError) values = {} expect( @holodeck.has_request?(Holodeck::Request.new( @@ -392,12 +392,12 @@ "url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] )) - actual = @client.chat.v2.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .messages("IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update() + actual = @client.chat.v2.services('ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .channels('CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') \ + .messages('IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa').update() expect(actual).to_not eq(nil) end end \ No newline at end of file