Sha256: 590183ee329bb738ca2419ab0419d8ae1ac33be51826a13cc3fbde84524089f7

Contents?: true

Size: 1.39 KB

Versions: 2

Compression:

Stored size: 1.39 KB

Contents

require 'spec_helper'

describe Twilio::REST::Country do

  before do
    @country = Twilio::REST::Country.new('someUri', 'someClient')
  end

  it 'sets up a local resources object' do
    @country.should respond_to(:local)
    @country.local.instance_variable_get('@path').should == 'someUri/Local'
  end

  it 'sets up a toll_free resources object' do
    @country.should respond_to(:toll_free)
    @country.toll_free.instance_variable_get('@path').should == 'someUri/TollFree'
  end

  it 'sets up a mobile resources object' do
    @country.should respond_to(:mobile)
    @country.mobile.instance_variable_get('@path').should == 'someUri/Mobile'
  end

end

describe Twilio::REST::NumberType do

  before do
    @incoming_phone_numbers = Twilio::REST::IncomingPhoneNumbers.new('someUri', 'someClient')
  end

  it 'sets up a local resources object' do
    @incoming_phone_numbers.should respond_to(:local)
    @incoming_phone_numbers.local.instance_variable_get('@path').should == 'someUri/Local'
  end

  it 'sets up a toll_free resources object' do
    @incoming_phone_numbers.should respond_to(:toll_free)
    @incoming_phone_numbers.toll_free.instance_variable_get('@path').should == 'someUri/TollFree'
  end

  it 'sets up a mobile resources object' do
    @incoming_phone_numbers.should respond_to(:mobile)
    @incoming_phone_numbers.mobile.instance_variable_get('@path').should == 'someUri/Mobile'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
twilio-ruby-3.11.5 spec/rest/numbers_spec.rb
twilio-ruby-3.11.4 spec/rest/numbers_spec.rb