Sha256: e107fd5a319cefe43b80497fa8ed55420d252d1897d39b075f0f8a0903f961c9

Contents?: true

Size: 1.24 KB

Versions: 16

Compression:

Stored size: 1.24 KB

Contents

require 'spec_helper'

describe Twilio::REST::PricingClient do
  before do
    @client = Twilio::REST::PricingClient.new('AC123', 'foobar')
  end

  it 'should set up a voice resources object' do
    expect(@client).to respond_to(:voice)
    expect(@client.voice.instance_variable_get('@path')).to eq(
      '/v1/Voice'
    )
  end

  it 'should set up the country list resource on voice' do
    voice = @client.voice
    expect(voice).to respond_to(:countries)
    expect(voice.countries.instance_variable_get('@path')).to eq(
      '/v1/Voice/Countries'
    )
  end

  it 'should set up the numbers resource on voice' do
    voice = @client.voice
    expect(voice).to respond_to(:numbers)
    expect(voice.numbers.instance_variable_get('@path')).to eq(
      '/v1/Voice/Numbers'
    )
  end

  it 'should set up a phone numbers resource object' do
    expect(@client).to respond_to(:phone_numbers)
    expect(@client.phone_numbers.instance_variable_get('@path')).to eq(
      '/v1/PhoneNumbers'
    )
  end

  it 'should set up a countries list on phone numbers' do
    numbers = @client.phone_numbers
    expect(numbers).to respond_to(:countries)
    expect(numbers.countries.instance_variable_get('@path')).to eq(
      '/v1/PhoneNumbers/Countries'
    )
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
twilio-ruby-4.9.0.edge spec/rest/pricing_client_spec.rb
twilio-ruby-4.8.3.edge spec/rest/pricing_client_spec.rb
twilio-ruby-4.8.2.edge spec/rest/pricing_client_spec.rb
twilio-ruby-4.8.1.edge spec/rest/pricing_client_spec.rb
twilio-ruby-4.8.0.edge spec/rest/pricing_client_spec.rb
twilio-ruby-4.6.1 spec/rest/pricing_client_spec.rb
twilio-ruby-4.6.0 spec/rest/pricing_client_spec.rb
twilio-ruby-4.7.0.edge spec/rest/pricing_client_spec.rb
twilio-ruby-4.6.0.edge spec/rest/pricing_client_spec.rb
twilio-ruby-4.5.0 spec/rest/pricing_client_spec.rb
twilio-ruby-4.4.0 spec/rest/pricing_client_spec.rb
twilio-ruby-4.3.0 spec/rest/pricing_client_spec.rb
twilio-ruby-4.2.1 spec/rest/pricing_client_spec.rb
twilio-ruby-4.2.0 spec/rest/pricing_client_spec.rb
twilio-ruby-4.1.0 spec/rest/pricing_client_spec.rb
twilio-ruby-4.0.1 spec/rest/pricing_client_spec.rb