spec/integration/taskrouter/v1/workspace/workflow_spec.rb in twilio-ruby-5.1.2 vs spec/integration/taskrouter/v1/workspace/workflow_spec.rb in twilio-ruby-5.2.0
- old
+ new
@@ -6,11 +6,11 @@
require 'spec_helper.rb'
describe 'Workflow' do
it "can fetch" do
- @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
+ @holodeck.mock(Twilio::Response.new(500, ''))
expect {
@client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
.workflows("WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -22,11 +22,11 @@
url: 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
))).to eq(true)
end
it "receives fetch responses" do
- @holodeck.mock(Twilio::TwilioResponse.new(
+ @holodeck.mock(Twilio::Response.new(
200,
%q[
{
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"assignment_callback_url": "http://example.com",
@@ -52,11 +52,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.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
.workflows("WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -68,11 +68,11 @@
url: 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
))).to eq(true)
end
it "receives update responses" do
- @holodeck.mock(Twilio::TwilioResponse.new(
+ @holodeck.mock(Twilio::Response.new(
200,
%q[
{
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"assignment_callback_url": "http://example.com",
@@ -98,11 +98,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.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
.workflows("WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -114,11 +114,11 @@
url: 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
))).to eq(true)
end
it "receives delete responses" do
- @holodeck.mock(Twilio::TwilioResponse.new(
+ @holodeck.mock(Twilio::Response.new(
204,
nil,
))
actual = @client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
@@ -126,11 +126,11 @@
expect(actual).to eq(true)
end
it "can read" do
- @holodeck.mock(Twilio::TwilioResponse.new(500, ''))
+ @holodeck.mock(Twilio::Response.new(500, ''))
expect {
@client.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
.workflows.list()
}.to raise_exception(Twilio::REST::TwilioError)
@@ -142,11 +142,11 @@
url: 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows',
))).to eq(true)
end
it "receives read_full responses" do
- @holodeck.mock(Twilio::TwilioResponse.new(
+ @holodeck.mock(Twilio::Response.new(
200,
%q[
{
"meta": {
"first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?PageSize=50&Page=0",
@@ -186,11 +186,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[
{
"meta": {
"first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows?PageSize=50&Page=0",
@@ -212,11 +212,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.taskrouter.v1.workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
.workflows.create(friendly_name: "friendly_name", configuration: "configuration")
}.to raise_exception(Twilio::REST::TwilioError)
@@ -232,10 +232,10 @@
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",
"assignment_callback_url": "http://example.com",
\ No newline at end of file