spec/integration/api/v2010/account/connect_app_spec.rb in twilio-ruby-5.22.3 vs spec/integration/api/v2010/account/connect_app_spec.rb in twilio-ruby-5.23.0
- old
+ new
@@ -129,18 +129,15 @@
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps/CNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
}
],
"end": 0,
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json?Page=0&PageSize=50",
- "last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json?Page=0&PageSize=50",
"next_page_uri": null,
- "num_pages": 1,
"page": 0,
"page_size": 50,
"previous_page_uri": null,
"start": 0,
- "total": 1,
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json"
}
]
))
@@ -156,24 +153,49 @@
%q[
{
"connect_apps": [],
"end": 0,
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json?Page=0&PageSize=50",
- "last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json?Page=0&PageSize=50",
"next_page_uri": null,
- "num_pages": 1,
"page": 0,
"page_size": 50,
"previous_page_uri": null,
"start": 0,
- "total": 1,
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json"
}
]
))
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
.connect_apps.list()
expect(actual).to_not eq(nil)
+ end
+
+ it "can delete" do
+ @holodeck.mock(Twilio::Response.new(500, ''))
+
+ expect {
+ @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
+ .connect_apps('CNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
+ }.to raise_exception(Twilio::REST::TwilioError)
+
+ values = {}
+ expect(
+ @holodeck.has_request?(Holodeck::Request.new(
+ method: 'delete',
+ url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/CNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json',
+ ))).to eq(true)
+ end
+
+ it "receives delete responses" do
+ @holodeck.mock(Twilio::Response.new(
+ 204,
+ nil,
+ ))
+
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
+ .connect_apps('CNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
+
+ expect(actual).to eq(true)
end
end
\ No newline at end of file