diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-12-04 04:14:55 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-12-04 04:14:55 -0800 |
commit | 9c60e3df9f202e8db37bea4ddddef47605075bcc (patch) | |
tree | 3782feafe908254d31cf0ac755cd92360b712b09 /actionpack/test | |
parent | 64226302d82493d9bf67aa9e4fa52b4e0269ee3d (diff) | |
parent | 9e625d64656556ac30172ce5bcc800da463dd777 (diff) | |
download | rails-9c60e3df9f202e8db37bea4ddddef47605075bcc.tar.gz rails-9c60e3df9f202e8db37bea4ddddef47605075bcc.tar.bz2 rails-9c60e3df9f202e8db37bea4ddddef47605075bcc.zip |
Merge pull request #13162 from makandra/3-2-stable
Repair a test broken by the number_to_currency XSS fix
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/number_helper_i18n_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/template/number_helper_i18n_test.rb b/actionpack/test/template/number_helper_i18n_test.rb index d6e9de9555..4710cbf6bc 100644 --- a/actionpack/test/template/number_helper_i18n_test.rb +++ b/actionpack/test/template/number_helper_i18n_test.rb @@ -7,7 +7,7 @@ class NumberHelperTest < ActionView::TestCase I18n.backend.store_translations 'ts', :number => { :format => { :precision => 3, :delimiter => ',', :separator => '.', :significant => false, :strip_insignificant_zeros => false }, - :currency => { :format => { :unit => '&$', :format => '%u - %n', :negative_format => '(%u - %n)', :precision => 2 } }, + :currency => { :format => { :unit => '$$$', :format => '%u - %n', :negative_format => '(%u - %n)', :precision => 2 } }, :human => { :format => { :precision => 2, @@ -42,9 +42,9 @@ class NumberHelperTest < ActionView::TestCase end def test_number_to_i18n_currency - assert_equal("&$ - 10.00", number_to_currency(10, :locale => 'ts')) - assert_equal("(&$ - 10.00)", number_to_currency(-10, :locale => 'ts')) - assert_equal("-10.00 - &$", number_to_currency(-10, :locale => 'ts', :format => "%n - %u")) + assert_equal("$$$ - 10.00", number_to_currency(10, :locale => 'ts')) + assert_equal("($$$ - 10.00)", number_to_currency(-10, :locale => 'ts')) + assert_equal("-10.00 - $$$", number_to_currency(-10, :locale => 'ts', :format => "%n - %u")) end def test_number_to_currency_with_clean_i18n_settings |