Permalink
Browse files

+ Hej Danmark!

  • Loading branch information...
1 parent e32f33e commit 9c99b6735696cdb34b58b50fa3870654be196adf @floere committed Nov 30, 2010
Showing with 6 additions and 1 deletion.
  1. +3 −1 lib/phony/countries/all_other.rb
  2. +3 −0 spec/lib/phony_spec.rb
View
4 lib/phony/countries/all_other.rb
@@ -75,7 +75,9 @@ def self.mapping
),
'43' => Countries::Austria,
'44' => fixed(2), # TODO United Kingdom of Great Britain and Northern Ireland
- '45' => fixed(2), # TODO Denmark
+ '45' => fixed(2, # Denmark
+ :local_format => [2, 2, 2]
+ ),
'46' => Countries::Sweden,
'47' => fixed(4, # Norway
:local_format => [4]
View
3 spec/lib/phony_spec.rb
@@ -8,6 +8,9 @@
it "should handle austrian numbers" do
Phony.split('43198110').should == ['43', '1', '98110']
end
+ it 'handles danish numbers' do
+ Phony.split('4532121212').should == ['45', '32', '12', '12', '12']
+ end
it "should handle dutch numbers" do
Phony.split('31612345678').should == ['31', '6', '12345678'] # mobile
Phony.split('31201234567').should == ['31', '20', '1234567']

0 comments on commit 9c99b67

Please sign in to comment.