## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 # / / require 'spec_helper.rb' describe 'Service' do it "can fetch" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) expect { @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() }.to raise_exception(Twilio::REST::TwilioException) values = {} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'get', url: 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', ))).to eq(true) end it "can delete" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) expect { @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() }.to raise_exception(Twilio::REST::TwilioException) values = {} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'get', url: 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', ))).to eq(true) end it "can create" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) expect { @client.ip_messaging.v1.services.create(friendly_name: "friendly_name") }.to raise_exception(Twilio::REST::TwilioException) values = { 'FriendlyName' => "friendly_name", } expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', url: 'https://ip-messaging.twilio.com/v1/Services', data: values, ))).to eq(true) end it "can read" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) expect { @client.ip_messaging.v1.services.list() }.to raise_exception(Twilio::REST::TwilioException) values = {} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'get', url: 'https://ip-messaging.twilio.com/v1/Services', ))).to eq(true) end it "can update" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) expect { @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update() }.to raise_exception(Twilio::REST::TwilioException) values = {} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', url: 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', ))).to eq(true) end end