spec/integration/preview/proxy/service_spec.rb in twilio-ruby-5.1.2 vs spec/integration/preview/proxy/service_spec.rb in twilio-ruby-5.2.0
- old
+ new
@@ -6,11 +6,11 @@
require 'spec_helper.rb'
describe 'Service' do
it "can fetch" do
- @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
+ @holodeck.mock(Twilio::Response.new(500, ''))
expect {
@client.preview.proxy.services("KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -21,11 +21,11 @@
url: 'https://preview.twilio.com/Proxy/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
))).to eq(true)
end
it "receives fetch responses" do
- @holodeck.mock(Twilio::TwilioResponse.new(
+ @holodeck.mock(Twilio::Response.new(
200,
%q[
{
"friendly_name": "friendly_name",
"date_created": "2015-07-30T20:00:00Z",
@@ -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.preview.proxy.services.list()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -63,11 +63,11 @@
url: 'https://preview.twilio.com/Proxy/Services',
))).to eq(true)
end
it "receives read_empty responses" do
- @holodeck.mock(Twilio::TwilioResponse.new(
+ @holodeck.mock(Twilio::Response.new(
200,
%q[
{
"meta": {
"previous_page_url": null,
@@ -87,11 +87,11 @@
expect(actual).to_not eq(nil)
end
it "can create" do
- @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
+ @holodeck.mock(Twilio::Response.new(500, ''))
expect {
@client.preview.proxy.services.create()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -102,11 +102,11 @@
url: 'https://preview.twilio.com/Proxy/Services',
))).to eq(true)
end
it "receives create responses" do
- @holodeck.mock(Twilio::TwilioResponse.new(
+ @holodeck.mock(Twilio::Response.new(
201,
%q[
{
"friendly_name": "friendly_name",
"date_created": "2015-07-30T20:00:00Z",
@@ -129,11 +129,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").delete()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -144,22 +144,22 @@
url: 'https://preview.twilio.com/Proxy/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
))).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").delete()
expect(actual).to eq(true)
end
it "can update" do
- @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
+ @holodeck.mock(Twilio::Response.new(500, ''))
expect {
@client.preview.proxy.services("KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -170,10 +170,10 @@
url: 'https://preview.twilio.com/Proxy/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
))).to eq(true)
end
it "receives update responses" do
- @holodeck.mock(Twilio::TwilioResponse.new(
+ @holodeck.mock(Twilio::Response.new(
200,
%q[
{
"friendly_name": "friendly_name",
"date_created": "2015-07-30T20:00:00Z",
\ No newline at end of file