spec/integration/api/v2010/account/message/media_spec.rb in twilio-ruby-5.0.0.rc18 vs spec/integration/api/v2010/account/message/media_spec.rb in twilio-ruby-5.0.0.rc19

- old
+ new

@@ -1,23 +1,23 @@ ## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 -# / / +# / / require 'spec_helper.rb' describe 'Media' do it "can delete" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) - + expect { @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .messages("MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .media("MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() }.to raise_exception(Twilio::REST::TwilioException) - + values = {} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'delete', url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media/MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json', @@ -27,27 +27,27 @@ it "receives delete responses" do @holodeck.mock(Twilio::TwilioResponse.new( 204, nil, )) - + actual = @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .messages("MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .media("MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() - + expect(actual).to eq(true) end it "can fetch" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) - + expect { @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .messages("MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .media("MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() }.to raise_exception(Twilio::REST::TwilioException) - + values = {} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'get', url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media/MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json', @@ -67,27 +67,27 @@ "sid": "MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media/MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json" } ] )) - + actual = @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .messages("MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .media("MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() - + expect(actual).to_not eq(nil) end it "can read" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) - + expect { @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .messages("MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .media.list() }.to raise_exception(Twilio::REST::TwilioException) - + values = {} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'get', url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json', @@ -122,15 +122,15 @@ "total": 1, "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json?PageSize=50&Page=0" } ] )) - + actual = @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .messages("MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .media.list() - + expect(actual).to_not eq(nil) end it "receives read_empty responses" do @holodeck.mock(Twilio::TwilioResponse.new( @@ -150,13 +150,13 @@ "total": 1, "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json?PageSize=50&Page=0" } ] )) - + actual = @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .messages("MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .media.list() - + expect(actual).to_not eq(nil) end end \ No newline at end of file