Skip to content

Commit

Permalink
repair a test broken by the number_to_currency XSS fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kraatob committed Dec 4, 2013
1 parent 6422630 commit 9e625d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions actionpack/test/template/number_helper_i18n_test.rb
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9e625d6

Please sign in to comment.