Sha256: 454eff797a5a75576d8decb9800d7cc4d0e6a623b2b8346271cddb2cd01a0bd9

Contents?: true

Size: 742 Bytes

Versions: 21

Compression:

Stored size: 742 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../test_helper')

## United States
class USTest < Phonie::TestCase

  def test_local
    parse_test('+1 251 123 4567', '1', '251', '1234567', 'United States')
  end

  def test_tollfree
    parse_test('+1 800 555 3456', '1', '800', '5553456', 'United States')
  end

  def test_long_with_default_country_code
    Phonie.configuration.default_country_code = '1'
    parse_test('2069735100', '1', '206', '9735100', 'United States')
  end

  def test_short_with_default_country_code_and_area_code
    Phonie.configure do |config|
      config.default_country_code = '1'
      config.default_area_code = '206'
    end
    parse_test('9735100', '1', '206', '9735100', 'United States')
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
phonie-3.3.1 test/countries/us_test.rb
phonie-3.2.2 test/countries/us_test.rb
phonie-3.2.1 test/countries/us_test.rb
phonie-3.2.0 test/countries/us_test.rb
phonie-3.1.15 test/countries/us_test.rb
phonie-3.1.14 test/countries/us_test.rb
phonie-3.1.13 test/countries/us_test.rb
phonie-3.1.12 test/countries/us_test.rb
phonie-3.1.11 test/countries/us_test.rb
phonie-3.1.10 test/countries/us_test.rb
phonie-3.1.9 test/countries/us_test.rb
phonie-3.1.8 test/countries/us_test.rb
phonie-3.1.7 test/countries/us_test.rb
phonie-3.1.6 test/countries/us_test.rb
phonie-3.1.5 test/countries/us_test.rb
phonie-3.1.4 test/countries/us_test.rb
phonie-3.1.3 test/countries/us_test.rb
phonie-3.1.2 test/countries/us_test.rb
phonie-3.1.1 test/countries/us_test.rb
phonie-3.1.0 test/countries/us_test.rb