Skip to content

Commit

Permalink
added test for issue #132
Browse files Browse the repository at this point in the history
  • Loading branch information
daddyz committed Apr 3, 2018
1 parent 523d193 commit 295f783
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/phonelib_spec.rb
Expand Up @@ -939,6 +939,15 @@
end
end

context 'issue #132' do
it 'should simplify national prefix and make phone valid' do
phone = Phonelib.parse '0445532231113', 'MX'
expect(phone.valid?).to be true
expect(phone.international).to eq('+52 1 55 3223 1113')
expect(phone.country).to eq('MX')
end
end

context 'example numbers' do
it 'are valid' do
data_file = File.dirname(__FILE__) + '/../data/phone_data.dat'
Expand Down

0 comments on commit 295f783

Please sign in to comment.