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

- old
+ new

@@ -6,11 +6,11 @@ require 'spec_helper.rb' describe 'Trigger' do it "can fetch" do - @holodeck.mock(Twilio::TwilioResponse.new(500, '')) + @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .usage \ .triggers("UTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() @@ -23,11 +23,11 @@ url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Usage/Triggers/UTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.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", @@ -55,11 +55,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") \ .usage \ .triggers("UTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update() @@ -72,11 +72,11 @@ url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Usage/Triggers/UTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.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", "api_version": "2010-04-01", @@ -104,11 +104,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") \ .usage \ .triggers("UTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() @@ -121,11 +121,11 @@ url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Usage/Triggers/UTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.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") \ @@ -134,11 +134,11 @@ expect(actual).to eq(true) end it "can create" do - @holodeck.mock(Twilio::TwilioResponse.new(500, '')) + @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .usage \ .triggers.create(callback_url: "https://example.com", trigger_value: "trigger_value", usage_category: "answering-machine-detection") @@ -156,11 +156,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", @@ -188,11 +188,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") \ .usage \ .triggers.list() @@ -205,11 +205,11 @@ url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Usage/Triggers.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/Usage/Triggers?PageSize=1&Page=0", @@ -252,10 +252,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[ { "end": 0, "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Usage/Triggers?PageSize=1&Page=0", \ No newline at end of file