From 31a485fa5a843a766c4b889ee88a6c590a3a6ebb Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Wed, 4 Dec 2013 16:25:50 -0800 Subject: Merge pull request #13183 from sorah/never_ignore_i18n_translate_raise_option Escalate missing error when :raise is true in translate helper, fix regression introduced by security fix. Conflicts: actionpack/CHANGELOG.md --- actionpack/test/template/translation_helper_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/template/translation_helper_test.rb b/actionpack/test/template/translation_helper_test.rb index ebf0f892e6..96580a2b9a 100644 --- a/actionpack/test/template/translation_helper_test.rb +++ b/actionpack/test/template/translation_helper_test.rb @@ -52,6 +52,12 @@ class TranslationHelperTest < ActiveSupport::TestCase assert_equal false, translate(:"translations.missing", :rescue_format => nil).html_safe? end + def test_raises_missing_translation_message_with_raise_option + assert_raise(I18n::MissingTranslationData) do + translate(:"translations.missing", :raise => true) + end + end + def test_i18n_translate_defaults_to_nil_rescue_format expected = 'translation missing: en.translations.missing' assert_equal expected, I18n.translate(:"translations.missing") -- cgit v1.2.3