test/country_test.rb in phonie-2.0.2 vs test/country_test.rb in phonie-2.1.0
- old
+ new
@@ -22,6 +22,13 @@
countries = Phonie::Country.find_all_by_phone_code('47')
assert_equal 1, countries.length
assert_equal "Norway", countries.first.name
end
+ def test_national_dialing_prefix
+ tonga = Phonie::Country.find_by_country_code('TO')
+ assert_nil tonga.national_dialing_prefix
+
+ us_and_a = Phonie::Country.find_by_country_code('US')
+ assert_equal '1', us_and_a.national_dialing_prefix
+ end
end