spec/integration/messaging/v1/service/alpha_sender_spec.rb in twilio-ruby-5.1.2 vs spec/integration/messaging/v1/service/alpha_sender_spec.rb in twilio-ruby-5.2.0
- old
+ new
@@ -6,11 +6,11 @@
require 'spec_helper.rb'
describe 'AlphaSender' do
it "can create" do
- @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
+ @holodeck.mock(Twilio::Response.new(500, ''))
expect {
@client.messaging.v1.services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
.alpha_senders.create(alpha_sender: "alpha_sender")
}.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": "AIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -48,11 +48,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.messaging.v1.services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
.alpha_senders.list()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -64,11 +64,11 @@
url: 'https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders',
))).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,
@@ -100,11 +100,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.messaging.v1.services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
.alpha_senders("AIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -116,11 +116,11 @@
url: 'https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders/AIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
))).to eq(true)
end
it "receives fetch responses" do
- @holodeck.mock(Twilio::TwilioResponse.new(
+ @holodeck.mock(Twilio::Response.new(
200,
%q[
{
"sid": "AIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -139,11 +139,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.messaging.v1.services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
.alpha_senders("AIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -155,10 +155,10 @@
url: 'https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders/AIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
))).to eq(true)
end
it "receives delete responses" do
- @holodeck.mock(Twilio::TwilioResponse.new(
+ @holodeck.mock(Twilio::Response.new(
204,
nil,
))
actual = @client.messaging.v1.services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
\ No newline at end of file