diff options
author | Mac Martine <admin@cycle7.com> | 2011-10-12 17:06:44 -0700 |
---|---|---|
committer | Mac Martine <admin@cycle7.com> | 2011-10-12 17:06:44 -0700 |
commit | 20728f551c2a429fc7c29c6ac17b3f44b57526b9 (patch) | |
tree | 802226639a93bb6f32e0ad3753dda54459a8ed04 /actionpack/test/template | |
parent | f6c93495650ac9ff400d59ba91287876088e6d11 (diff) | |
download | rails-20728f551c2a429fc7c29c6ac17b3f44b57526b9.tar.gz rails-20728f551c2a429fc7c29c6ac17b3f44b57526b9.tar.bz2 rails-20728f551c2a429fc7c29c6ac17b3f44b57526b9.zip |
remove user-specified delimiter from start when no area code is present (in number_to_phone)
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/number_helper_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/test/template/number_helper_test.rb b/actionpack/test/template/number_helper_test.rb index 0e3475d98b..8d679aac1d 100644 --- a/actionpack/test/template/number_helper_test.rb +++ b/actionpack/test/template/number_helper_test.rb @@ -27,6 +27,7 @@ class NumberHelperTest < ActionView::TestCase assert_equal("800 555 1212", number_to_phone(8005551212, {:delimiter => " "})) assert_equal("(800) 555-1212 x 123", number_to_phone(8005551212, {:area_code => true, :extension => 123})) assert_equal("800-555-1212", number_to_phone(8005551212, :extension => " ")) + assert_equal("555.1212", number_to_phone(5551212, :delimiter => '.')) assert_equal("800-555-1212", number_to_phone("8005551212")) assert_equal("+1-800-555-1212", number_to_phone(8005551212, :country_code => 1)) assert_equal("+18005551212", number_to_phone(8005551212, :country_code => 1, :delimiter => '')) |