Skip to content

Commit

Permalink
Added tests for issue 2802, pull request 2890 - number_with_precision…
Browse files Browse the repository at this point in the history
… with empty translation store
  • Loading branch information
christianblais authored and carlosantoniodasilva committed May 14, 2012
1 parent 63a407f commit f6a1d4d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions actionpack/test/template/number_helper_i18n_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ def test_number_with_i18n_precision

end

def test_number_with_empty_i18n_store
I18n.backend.store_translations 'empty', {}

#Precision should be defaulted to 3, separator to ".", delimiter to ""
assert_equal("123456789.123", number_with_precision(123456789.123456789, :locale => 'empty'))
#Significant and strip_insignificant_zeros should be defaulted to false
assert_equal("1.000", number_with_precision(1.0000, :locale => 'empty'))
end

def test_number_with_i18n_delimiter
#Delimiter "," and separator "."
assert_equal("1,000,000.234", number_with_delimiter(1000000.234, :locale => 'ts'))
Expand Down

0 comments on commit f6a1d4d

Please sign in to comment.