spec/integration/api/v2010/account/message_spec.rb in twilio-ruby-5.1.2 vs spec/integration/api/v2010/account/message_spec.rb in twilio-ruby-5.2.0

- old
+ new

@@ -6,11 +6,11 @@ require 'spec_helper.rb' describe 'Message' do it "can create" do - @holodeck.mock(Twilio::TwilioResponse.new(500, '')) + @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .messages.create(to: "+123456789") }.to raise_exception(Twilio::REST::TwilioError) @@ -25,11 +25,11 @@ data: values, ))).to eq(true) end it "receives create responses" do - @holodeck.mock(Twilio::TwilioResponse.new( + @holodeck.mock(Twilio::Response.new( 201, %q[ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "api_version": "2010-04-01", @@ -62,11 +62,11 @@ expect(actual).to_not eq(nil) end it "can delete" do - @holodeck.mock(Twilio::TwilioResponse.new(500, '')) + @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .messages("MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() }.to raise_exception(Twilio::REST::TwilioError) @@ -78,11 +78,11 @@ url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json', ))).to eq(true) end it "receives delete responses" do - @holodeck.mock(Twilio::TwilioResponse.new( + @holodeck.mock(Twilio::Response.new( 204, nil, )) actual = @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ @@ -90,11 +90,11 @@ expect(actual).to eq(true) end it "can fetch" do - @holodeck.mock(Twilio::TwilioResponse.new(500, '')) + @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .messages("MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() }.to raise_exception(Twilio::REST::TwilioError) @@ -106,11 +106,11 @@ url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json', ))).to eq(true) end it "receives fetch responses" do - @holodeck.mock(Twilio::TwilioResponse.new( + @holodeck.mock(Twilio::Response.new( 200, %q[ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "api_version": "2010-04-01", @@ -143,11 +143,11 @@ expect(actual).to_not eq(nil) end it "can read" do - @holodeck.mock(Twilio::TwilioResponse.new(500, '')) + @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .messages.list() }.to raise_exception(Twilio::REST::TwilioError) @@ -159,11 +159,11 @@ url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages.json', ))).to eq(true) end it "receives read_full responses" do - @holodeck.mock(Twilio::TwilioResponse.new( + @holodeck.mock(Twilio::Response.new( 200, %q[ { "end": 0, "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages.json?PageSize=1&Page=0", @@ -211,11 +211,11 @@ expect(actual).to_not eq(nil) end it "receives read_empty responses" do - @holodeck.mock(Twilio::TwilioResponse.new( + @holodeck.mock(Twilio::Response.new( 200, %q[ { "end": 0, "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages.json?PageSize=1&Page=0", @@ -238,11 +238,11 @@ expect(actual).to_not eq(nil) end it "can update" do - @holodeck.mock(Twilio::TwilioResponse.new(500, '')) + @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .messages("MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(body: "body") }.to raise_exception(Twilio::REST::TwilioError) @@ -257,10 +257,10 @@ data: values, ))).to eq(true) end it "receives update responses" do - @holodeck.mock(Twilio::TwilioResponse.new( + @holodeck.mock(Twilio::Response.new( 200, %q[ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "api_version": "2010-04-01", \ No newline at end of file