Sha256: 1f57e663b47cfe471790971b0cfd9a16a9152f4b3e5c13e8afb890c7d1f6d132
Contents?: true
Size: 1.61 KB
Versions: 4
Compression:
Stored size: 1.61 KB
Contents
## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 # / / # # frozen_string_literal: true require 'spec_helper.rb' describe 'BrandedCall' do it "can create" do @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.preview.trusted_comms.branded_calls.create(from: 'from', to: 'to', reason: 'reason') }.to raise_exception(Twilio::REST::TwilioError) values = {'From' => 'from', 'To' => 'to', 'Reason' => 'reason', } expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', url: 'https://preview.twilio.com/TrustedComms/Business/BrandedCalls', data: values, ))).to eq(true) end it "receives create responses" do @holodeck.mock(Twilio::Response.new( 201, %q[ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "bg_color": "#fff", "caller": "Owl Bank", "created_at": "2019-05-01T20:00:00Z", "font_color": "#000", "from": "+15000000000", "logo": "https://www.twilio.com/marketing/bundles/company/img/logos/red/twilio-logo-red.png", "reason": "Hello Jhon, your appointment has been confirmed.", "sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "status": "unknown", "to": "+573000000000", "use_case": "conversational", "url": "https://preview.twilio.com/TrustedComms/Business/BrandedCalls" } ] )) actual = @client.preview.trusted_comms.branded_calls.create(from: 'from', to: 'to', reason: 'reason') expect(actual).to_not eq(nil) end end
Version data entries
4 entries across 4 versions & 1 rubygems