Sha256: d7f6180dc29127f516d4cd8db0fb104dd36251ad2f3a0d2a08ef86ae688e06f9
Contents?: true
Size: 1.48 KB
Versions: 9
Compression:
Stored size: 1.48 KB
Contents
## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 # / / # # frozen_string_literal: true require 'spec_helper.rb' describe 'Verification' do it "can create" do @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.verify.v1.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \ .verifications.create(to: 'to', channel: 'channel') }.to raise_exception(Twilio::REST::TwilioError) values = {'To' => 'to', 'Channel' => 'channel', } expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', url: 'https://verify.twilio.com/v1/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Verifications', data: values, ))).to eq(true) end it "receives create_verification responses" do @holodeck.mock(Twilio::Response.new( 201, %q[ { "sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "to": "+14159373912", "channel": "sms", "status": "pending", "valid": null, "date_created": "2015-07-30T20:00:00Z", "date_updated": "2015-07-30T20:00:00Z" } ] )) actual = @client.verify.v1.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \ .verifications.create(to: 'to', channel: 'channel') expect(actual).to_not eq(nil) end end
Version data entries
9 entries across 9 versions & 1 rubygems