Browse files

! Shenzen spec

  • Loading branch information...
1 parent a34ffc2 commit 271a3c37d066cfef10c61a221fde970712c9073b @floere committed Jan 1, 2011
Showing with 2 additions and 1 deletion.
  1. +1 −1 lib/phony/countries/china.rb
  2. +1 −0 spec/lib/phony_spec.rb
View
2 lib/phony/countries/china.rb
@@ -6,7 +6,7 @@
#
Phony::Countries::China = Phony::Country.configured :local_format => [4, 4],
:local_special_format => [8],
- :ndc_fallback_length => 2,
+ :ndc_fallback_length => 3,
:ndc_mapping => {
:landline => [
'10', # Beijing, TODO Confirm – is it 10 or 1?
View
1 spec/lib/phony_spec.rb
@@ -21,6 +21,7 @@
end
it 'handles chinese numbers' do
Phony.split('862112345678').should == ['86', '21', '1234', '5678'] # Shanghai
+ Phony.split('8675582193447').should == ['86', '755', '8219', '3447'] # Shenzhen
end
it 'handles danish numbers' do
Phony.split('4532121212').should == ['45', '32', '12', '12', '12']

0 comments on commit 271a3c3

Please sign in to comment.