Permalink
Browse files

Merge pull request #13162 from makandra/3-2-stable

Repair a test broken by the number_to_currency XSS fix
  • Loading branch information...
2 parents 6422630 + 9e625d6 commit 9c60e3df9f202e8db37bea4ddddef47605075bcc @rafaelfranca rafaelfranca committed Dec 4, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 actionpack/test/template/number_helper_i18n_test.rb
@@ -7,7 +7,7 @@ def setup
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 @@ def setup
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

0 comments on commit 9c60e3d

Please sign in to comment.