test/phonelib_test.rb in phonelib-0.2.2 vs test/phonelib_test.rb in phonelib-0.2.3

- old
+ new

@@ -176,9 +176,14 @@ should 'return sanitized national when number invalid but possible' do phone = Phonelib.parse('9721234567') assert_equal '1234567', phone.national end + + should 'return without leading digit for CN number' do + phone = Phonelib.parse('18621374266', 'CN') + assert_equal '186 2137 4266', phone.national + end end context 'default_country' do should 'be invalid with no default country set' do phone = Phonelib.parse('541234567')