diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-12-03 11:01:56 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-12-03 11:01:56 -0800 |
commit | dba82120fe58d7a87973aef11bc7d85ee8ebf258 (patch) | |
tree | a0e64d31f70dd6a74f41cacbc0f17977abd0cd6f /actionview/test | |
parent | be5527b8e8fcc25946b128fe78db10d5bee2a483 (diff) | |
parent | 4e9dd5378bd5bfaa095a96068c7d1b7c4f47e1b0 (diff) | |
download | rails-dba82120fe58d7a87973aef11bc7d85ee8ebf258.tar.gz rails-dba82120fe58d7a87973aef11bc7d85ee8ebf258.tar.bz2 rails-dba82120fe58d7a87973aef11bc7d85ee8ebf258.zip |
Merge branch 'master-sec'
* master-sec:
Deep Munge the parameters for GET and POST
Stop using i18n's built in HTML error handling.
Ensure simple_format escapes its html attributes
Escape the unit value provided to number_to_currency
Only use valid mime type symbols as cache keys
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/number_helper_test.rb | 3 | ||||
-rw-r--r-- | actionview/test/template/translation_helper_test.rb | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/actionview/test/template/number_helper_test.rb b/actionview/test/template/number_helper_test.rb index 6e640889d2..be336ea3fb 100644 --- a/actionview/test/template/number_helper_test.rb +++ b/actionview/test/template/number_helper_test.rb @@ -14,7 +14,8 @@ class NumberHelperTest < ActionView::TestCase assert_equal nil, number_to_currency(nil) assert_equal "$1,234,567,890.50", number_to_currency(1234567890.50) assert_equal "$1,234,567,892", number_to_currency(1234567891.50, precision: 0) - assert_equal "1,234,567,890.50 - Kč", number_to_currency("-1234567890.50", unit: "Kč", format: "%n %u", negative_format: "%n - %u") + assert_equal "1,234,567,890.50 - Kč", number_to_currency("-1234567890.50", unit: raw("Kč"), format: "%n %u", negative_format: "%n - %u") + assert_equal "&pound;1,234,567,890.50", number_to_currency("1234567890.50", unit: "£") end def test_number_to_percentage diff --git a/actionview/test/template/translation_helper_test.rb b/actionview/test/template/translation_helper_test.rb index d496dbb35e..0dfe47f5f4 100644 --- a/actionview/test/template/translation_helper_test.rb +++ b/actionview/test/template/translation_helper_test.rb @@ -31,7 +31,7 @@ class TranslationHelperTest < ActiveSupport::TestCase end def test_delegates_to_i18n_setting_the_rescue_format_option_to_html - I18n.expects(:translate).with(:foo, :locale => 'en', :rescue_format => :html).returns("") + I18n.expects(:translate).with(:foo, :locale => 'en', :raise=>true).returns("") translate :foo, :locale => 'en' end |