added test for number_to_phone with an empty string and area code true

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
This commit is contained in:
Diego Carrion 2011-04-20 14:26:45 -03:00 committed by Santiago Pastorino
parent 12427c8dea
commit 873c13fc0d

@ -32,6 +32,7 @@ def test_number_to_phone
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 => " "))