Sha256: af60af7ae22815c913694125f49cab5357c69c2f868e3f7183e47664deec7c2e

Contents?: true

Size: 1.08 KB

Versions: 12

Compression:

Stored size: 1.08 KB

Contents

##
# This code was generated by
# \ / _    _  _|   _  _
#  | (_)\/(_)(_|\/| |(/_  v1.0.0
#       /       /
#
# frozen_string_literal: true

require 'spec_helper.rb'

describe 'AuthTokenPromotion' do
  it "can update" do
    @holodeck.mock(Twilio::Response.new(500, ''))

    expect {
      @client.accounts.v1.auth_token_promotion().update()
    }.to raise_exception(Twilio::REST::TwilioError)

    expect(
    @holodeck.has_request?(Holodeck::Request.new(
        method: 'post',
        url: 'https://accounts.twilio.com/v1/AuthTokens/Promote',
    ))).to eq(true)
  end

  it "receives update responses" do
    @holodeck.mock(Twilio::Response.new(
        200,
      %q[
      {
          "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "auth_token": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
          "date_created": "2015-07-31T04:00:00Z",
          "date_updated": "2015-07-31T04:00:00Z",
          "url": "https://accounts.twilio.com/v1/AuthTokens/Promote"
      }
      ]
    ))

    actual = @client.accounts.v1.auth_token_promotion().update()

    expect(actual).to_not eq(nil)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
twilio-ruby-5.50.0 spec/integration/accounts/v1/auth_token_promotion_spec.rb
twilio-ruby-5.49.0 spec/integration/accounts/v1/auth_token_promotion_spec.rb
twilio-ruby-5.48.0 spec/integration/accounts/v1/auth_token_promotion_spec.rb
twilio-ruby-5.47.0 spec/integration/accounts/v1/auth_token_promotion_spec.rb
twilio-ruby-5.46.1 spec/integration/accounts/v1/auth_token_promotion_spec.rb
twilio-ruby-5.46.0 spec/integration/accounts/v1/auth_token_promotion_spec.rb
twilio-ruby-5.45.1 spec/integration/accounts/v1/auth_token_promotion_spec.rb
twilio-ruby-5.45.0 spec/integration/accounts/v1/auth_token_promotion_spec.rb
twilio-ruby-5.44.0 spec/integration/accounts/v1/auth_token_promotion_spec.rb
twilio-ruby-5.43.0 spec/integration/accounts/v1/auth_token_promotion_spec.rb
twilio-ruby-5.42.0 spec/integration/accounts/v1/auth_token_promotion_spec.rb
twilio-ruby-5.41.0 spec/integration/accounts/v1/auth_token_promotion_spec.rb