test/phonelib_test.rb in phonelib-0.2.5 vs test/phonelib_test.rb in phonelib-0.2.6
- old
+ new
@@ -244,6 +244,18 @@
Phonelib.default_country = :CN
phone = Phonelib.parse('+41 44 668 18 00')
assert phone.valid?
end
end
+
+ context 'issue #16' do
+ should 'parse as LT country' do
+ phone = Phonelib.parse('00370 611 11 111')
+ assert_equal 'LT', phone.country
+ end
+
+ should 'show correct international' do
+ phone = Phonelib.parse('370 611 11 111')
+ assert_equal '+370 611 11111', phone.international
+ end
+ end
end