spec/integration/api/v2010/account/application_spec.rb in twilio-ruby-5.1.2 vs spec/integration/api/v2010/account/application_spec.rb in twilio-ruby-5.2.0
- old
+ new
@@ -6,11 +6,11 @@
require 'spec_helper.rb'
describe 'Application' do
it "can create" do
- @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
+ @holodeck.mock(Twilio::Response.new(500, ''))
expect {
@client.api.v2010.accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
.applications.create(friendly_name: "friendly_name")
}.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[
{
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"api_version": "2010-04-01",
@@ -60,11 +60,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") \
.applications("APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -76,11 +76,11 @@
url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Applications/APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.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") \
@@ -88,11 +88,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") \
.applications("APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -104,11 +104,11 @@
url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Applications/APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.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",
@@ -139,11 +139,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") \
.applications.list()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -155,11 +155,11 @@
url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Applications.json',
))).to eq(true)
end
it "receives read_full responses" do
- @holodeck.mock(Twilio::TwilioResponse.new(
+ @holodeck.mock(Twilio::Response.new(
200,
%q[
{
"applications": [
{
@@ -205,11 +205,11 @@
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[
{
"applications": [],
"end": 0,
@@ -232,11 +232,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") \
.applications("APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -248,10 +248,10 @@
url: 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Applications/APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.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",
\ No newline at end of file