Skip to content

Commit

Permalink
Add more Japanese cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
floere committed Jun 8, 2021
1 parent e73319f commit bf7e2ba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/lib/phony/country_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,15 @@
end
describe 'Japan' do
it 'normalizes correctly' do
Phony.normalize('+81-03-1234-5634').should == '81312345634'
Phony.normalize('03-1234-5634', cc: '81').should == '81312345634'
end
it 'formats correctly' do
Phony.format('81312345634').should == '+81-3-1234-5634'
end
it 'splits correctly' do
Phony.split('81312345634').should == %w(81 3 1234 5634)
end
end
end

Expand Down

0 comments on commit bf7e2ba

Please sign in to comment.