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

- old
+ new

@@ -6,11 +6,11 @@ require 'spec_helper.rb' describe 'Address' do it "can create" do - @holodeck.mock(Twilio::TwilioResponse.new(500, '')) + @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .addresses.create(customer_name: "customer_name", street: "street", city: "city", region: "region", postal_code: "postal_code", iso_country: "US") }.to raise_exception(Twilio::REST::TwilioError) @@ -30,11 +30,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", "city": "SF", @@ -59,11 +59,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") \ .addresses("ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() }.to raise_exception(Twilio::REST::TwilioError) @@ -75,11 +75,11 @@ url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses/ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.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") \ @@ -87,11 +87,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") \ .addresses("ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() }.to raise_exception(Twilio::REST::TwilioError) @@ -103,11 +103,11 @@ url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses/ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.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", "city": "SF", @@ -132,11 +132,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") \ .addresses("ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update() }.to raise_exception(Twilio::REST::TwilioError) @@ -148,11 +148,11 @@ url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses/ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json', ))).to eq(true) end it "receives update responses" do - @holodeck.mock(Twilio::TwilioResponse.new( + @holodeck.mock(Twilio::Response.new( 200, %q[ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "city": "SF", @@ -177,11 +177,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") \ .addresses.list() }.to raise_exception(Twilio::REST::TwilioError) @@ -193,11 +193,11 @@ url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses.json', ))).to eq(true) end it "receives read_full responses" do - @holodeck.mock(Twilio::TwilioResponse.new( + @holodeck.mock(Twilio::Response.new( 200, %q[ { "addresses": [ { @@ -237,10 +237,10 @@ 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[ { "addresses": [], "end": 0, \ No newline at end of file