diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-09 08:43:02 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-09 08:43:02 +0000 |
commit | afbfde9357ab0c6bbaebb62eaa99af8c3825d6ac (patch) | |
tree | 19f526f27d68af511d9e4abf25a044bd7228901f /actionpack/test/template | |
parent | 300421785532b78f719a241843206e210bb7cc9d (diff) | |
download | rails-afbfde9357ab0c6bbaebb62eaa99af8c3825d6ac.tar.gz rails-afbfde9357ab0c6bbaebb62eaa99af8c3825d6ac.tar.bz2 rails-afbfde9357ab0c6bbaebb62eaa99af8c3825d6ac.zip |
Fixed that number_to_currency(1000, {:precision => 0})) should return "$1,000", instead of "$1,000." #2122 [sd@notso.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2170 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/number_helper_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/test/template/number_helper_test.rb b/actionpack/test/template/number_helper_test.rb index 3c214b76e5..b0debc44fa 100644 --- a/actionpack/test/template/number_helper_test.rb +++ b/actionpack/test/template/number_helper_test.rb @@ -18,6 +18,8 @@ class NumberHelperTest < Test::Unit::TestCase def test_number_to_currency assert_equal("$1,234,567,890.50", number_to_currency(1234567890.50)) assert_equal("$1,234,567,890.51", number_to_currency(1234567890.506)) + assert_equal("$1,234,567,890", number_to_currency(1234567890.50, {:precision => 0})) + assert_equal("$1,234,567,890.5", number_to_currency(1234567890.50, {:precision => 1})) assert_equal("£1234567890,50", number_to_currency(1234567890.50, {:unit => "£", :separator => ",", :delimiter => ""})) end |