Sha256: daca36a4fefe846bb2e9a783e75a7dd8735cc17bcfb53e49c335da95f7cf3f56

Contents?: true

Size: 715 Bytes

Versions: 4

Compression:

Stored size: 715 Bytes

Contents

describe 'Geolookup::USA::AreaCodes' do


  describe 'info' do
    it 'should return data from the Area Code hash if area code is passed in as a string' do
      expect(Geolookup::USA::AreaCodes.find('202')).to eql({country: 'US', description: '', service: 'y', state: 'DC', type: 'general purpose code'})
    end

    it 'should return data from the Area Code hash if area code is passed in as a number' do
      expect(Geolookup::USA::AreaCodes.find(202)).to eql({country: 'US', description: '', service: 'y', state: 'DC', type: 'general purpose code'})
    end

    it 'should return an empty hash if there is no area_code data' do
      expect(Geolookup::USA::AreaCodes.find(2023)).to eql({})
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
geolookup-0.6.4 spec/lib/areacodes_spec.rb
geolookup-0.6.2 spec/lib/areacodes_spec.rb
geolookup-0.6.1 spec/lib/areacodes_spec.rb
geolookup-0.6.0 spec/lib/areacodes_spec.rb