diff options
author | Diego Carrion <dc.rec1@gmail.com> | 2011-04-20 14:26:45 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-04-25 17:57:54 -0300 |
commit | 873c13fc0ddc35e64a6b3abc8bde9721bd12b6b7 (patch) | |
tree | 5531008b51bc17cec71040979d2fb20ae53b9ec1 | |
parent | 12427c8dea1e817d7badc06f1f21af989c0f56ea (diff) | |
download | rails-873c13fc0ddc35e64a6b3abc8bde9721bd12b6b7.tar.gz rails-873c13fc0ddc35e64a6b3abc8bde9721bd12b6b7.tar.bz2 rails-873c13fc0ddc35e64a6b3abc8bde9721bd12b6b7.zip |
added test for number_to_phone with an empty string and area code true
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
-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 c8d50ebf75..23a7e17e65 100644 --- a/actionpack/test/template/number_helper_test.rb +++ b/actionpack/test/template/number_helper_test.rb @@ -32,6 +32,7 @@ class NumberHelperTest < ActionView::TestCase assert_equal("555-1234", number_to_phone(5551234)) assert_equal("800-555-1212", number_to_phone(8005551212)) assert_equal("(800) 555-1212", number_to_phone(8005551212, {:area_code => true})) + assert_equal("", number_to_phone("", {:area_code => true})) 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 => " ")) |