phony 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/phony/countries/all_other.rb +3 -1
- data/spec/lib/phony_spec.rb +3 -0
- metadata +2 -2
@@ -75,7 +75,9 @@ module Phony
|
|
75
75
|
),
|
76
76
|
'43' => Countries::Austria,
|
77
77
|
'44' => fixed(2), # TODO United Kingdom of Great Britain and Northern Ireland
|
78
|
-
'45' => fixed(2
|
78
|
+
'45' => fixed(2, # Denmark
|
79
|
+
:local_format => [2, 2, 2]
|
80
|
+
),
|
79
81
|
'46' => Countries::Sweden,
|
80
82
|
'47' => fixed(4, # Norway
|
81
83
|
:local_format => [4]
|
data/spec/lib/phony_spec.rb
CHANGED
@@ -8,6 +8,9 @@ describe Phony do
|
|
8
8
|
it "should handle austrian numbers" do
|
9
9
|
Phony.split('43198110').should == ['43', '1', '98110']
|
10
10
|
end
|
11
|
+
it 'handles danish numbers' do
|
12
|
+
Phony.split('4532121212').should == ['45', '32', '12', '12', '12']
|
13
|
+
end
|
11
14
|
it "should handle dutch numbers" do
|
12
15
|
Phony.split('31612345678').should == ['31', '6', '12345678'] # mobile
|
13
16
|
Phony.split('31201234567').should == ['31', '20', '1234567']
|