Sha256: 3f9d2c2a62fec07324806c0e7c199d915ee383e8c07c9beab47eb1e1823f636e

Contents?: true

Size: 633 Bytes

Versions: 3

Compression:

Stored size: 633 Bytes

Contents

require 'spec_helper'

RSpec.describe Public::AreaCode do
  describe 'listing area codes available for purchasing numbers', vcr: 'public/area_code/list' do
    let(:action) { Public::AreaCode.list params }
    let(:params) { {} }

    around do |example|
      VCR.use_cassette('resources/public/area_codes/list') do
        example.run
      end
    end

    it 'sends the request to Phaxio' do
      expect_api_request :get, 'public/area_codes', params
      action
    end

    it 'returns a collection of available area codes' do
      result = action
      expect(result).to be_a(Phaxio::Resource::Collection)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
phaxio-2.1.2 spec/resources/public/area_code_spec.rb
phaxio-2.1.1 spec/resources/public/area_code_spec.rb
phaxio-2.1.0 spec/resources/public/area_code_spec.rb