diff options
author | Andrew Mutz <andrew.mutz@gmail.com> | 2012-05-16 13:22:52 -0700 |
---|---|---|
committer | Andrew Mutz <andrew.mutz@gmail.com> | 2012-05-18 11:56:18 -0700 |
commit | 2c423b3f3f0d489b0e9943b69f5b25d97006ca74 (patch) | |
tree | b5ca003d51784280ee77889bd92de9001c8afe61 /actionpack/test | |
parent | 476ef2df74e1fb3646780950a3be1af85aa43adc (diff) | |
download | rails-2c423b3f3f0d489b0e9943b69f5b25d97006ca74.tar.gz rails-2c423b3f3f0d489b0e9943b69f5b25d97006ca74.tar.bz2 rails-2c423b3f3f0d489b0e9943b69f5b25d97006ca74.zip |
reverting decoupling of NumberHelper from safe_join and adding tests for escaping of delimiters and separators
Diffstat (limited to 'actionpack/test')
-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 5c6f23d70b..14ca6d9879 100644 --- a/actionpack/test/template/number_helper_test.rb +++ b/actionpack/test/template/number_helper_test.rb @@ -78,6 +78,8 @@ class NumberHelperTest < ActionView::TestCase assert_equal '12,345,678-05', number_with_delimiter(12345678.05, :separator => '-') assert_equal '12.345.678,05', number_with_delimiter(12345678.05, :separator => ',', :delimiter => '.') assert_equal '12.345.678,05', number_with_delimiter(12345678.05, :delimiter => '.', :separator => ',') + assert_equal '1<script></script>01', number_with_delimiter(1.01, :separator => "<script></script>") + assert_equal '1<script></script>000', number_with_delimiter(1000, :delimiter => "<script></script>") end def test_number_with_precision |