Sha256: 3999224c7b57b6e55ea03f3c04205258ad5c6d45900e796dd982567146748a98
Contents?: true
Size: 1.67 KB
Versions: 12
Compression:
Stored size: 1.67 KB
Contents
## # This code was generated by # \ / _ _ _| _ _ # | (_)\/(_)(_|\/| |(/_ v1.0.0 # / / # # frozen_string_literal: true require 'spec_helper.rb' describe 'SecondaryAuthToken' do it "can create" do @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.accounts.v1.secondary_auth_token().create() }.to raise_exception(Twilio::REST::TwilioError) expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', url: 'https://accounts.twilio.com/v1/AuthTokens/Secondary', ))).to eq(true) end it "receives create responses" do @holodeck.mock(Twilio::Response.new( 201, %q[ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_created": "2015-07-31T04:00:00Z", "date_updated": "2015-07-31T04:00:00Z", "secondary_auth_token": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "url": "https://accounts.twilio.com/v1/AuthTokens/Secondary" } ] )) actual = @client.accounts.v1.secondary_auth_token().create() expect(actual).to_not eq(nil) end it "can delete" do @holodeck.mock(Twilio::Response.new(500, '')) expect { @client.accounts.v1.secondary_auth_token().delete() }.to raise_exception(Twilio::REST::TwilioError) expect( @holodeck.has_request?(Holodeck::Request.new( method: 'delete', url: 'https://accounts.twilio.com/v1/AuthTokens/Secondary', ))).to eq(true) end it "receives delete responses" do @holodeck.mock(Twilio::Response.new( 204, nil, )) actual = @client.accounts.v1.secondary_auth_token().delete() expect(actual).to eq(true) end end
Version data entries
12 entries across 12 versions & 1 rubygems