## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 # / / require 'spec_helper.rb' describe 'User' do it "can fetch" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) expect { @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .users("USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").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/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', ))).to eq(true) end it "can delete" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) expect { @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .users("USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").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/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', ))).to eq(true) end it "can create" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) expect { @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .users.create(identity: "identity", role_sid: "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") }.to raise_exception(Twilio::REST::TwilioException) values = { 'Identity' => "identity", 'RoleSid' => "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", } expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', url: 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users', data: values, ))).to eq(true) end it "can read" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) expect { @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .users.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/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users', ))).to eq(true) end it "can update" do @holodeck.mock(Twilio::TwilioResponse.new(500, '')) expect { @client.ip_messaging.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ .users("USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(role_sid: "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") }.to raise_exception(Twilio::REST::TwilioException) values = { 'RoleSid' => "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", } expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', url: 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', data: values, ))).to eq(true) end end