spec/integration/preview/proxy/service/phone_number_spec.rb in twilio-ruby-5.1.2 vs spec/integration/preview/proxy/service/phone_number_spec.rb in twilio-ruby-5.2.0

- old
+ new

@@ -6,11 +6,11 @@ require 'spec_helper.rb' describe 'PhoneNumber' do it "can create" do - @holodeck.mock(Twilio::TwilioResponse.new(500, '')) + @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.preview.proxy.services("KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .phone_numbers.create(sid: "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") }.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[ { "sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", @@ -49,11 +49,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.preview.proxy.services("KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .phone_numbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() }.to raise_exception(Twilio::REST::TwilioError) @@ -65,11 +65,11 @@ url: 'https://preview.twilio.com/Proxy/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', ))).to eq(true) end it "receives delete responses" do - @holodeck.mock(Twilio::TwilioResponse.new( + @holodeck.mock(Twilio::Response.new( 204, nil, )) actual = @client.preview.proxy.services("KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ @@ -77,11 +77,11 @@ expect(actual).to eq(true) end it "can read" do - @holodeck.mock(Twilio::TwilioResponse.new(500, '')) + @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.preview.proxy.services("KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .phone_numbers.list() }.to raise_exception(Twilio::REST::TwilioError) @@ -93,11 +93,11 @@ url: 'https://preview.twilio.com/Proxy/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers', ))).to eq(true) end it "receives read_full responses" do - @holodeck.mock(Twilio::TwilioResponse.new( + @holodeck.mock(Twilio::Response.new( 200, %q[ { "meta": { "page": 0, @@ -130,11 +130,11 @@ expect(actual).to_not eq(nil) end it "can fetch" do - @holodeck.mock(Twilio::TwilioResponse.new(500, '')) + @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.preview.proxy.services("KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .phone_numbers("PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() }.to raise_exception(Twilio::REST::TwilioError) @@ -146,10 +146,10 @@ url: 'https://preview.twilio.com/Proxy/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', ))).to eq(true) end it "receives fetch responses" do - @holodeck.mock(Twilio::TwilioResponse.new( + @holodeck.mock(Twilio::Response.new( 200, %q[ { "sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", \ No newline at end of file