-
-
Save svenfuchs/1027175 to your computer and use it in GitHub Desktop.
i18n.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/actionpack/test/template/translation_helper_test.rb b/actionpack/test/template/translation_helper_test.rb | |
index cd9f54e..365841e 100644 | |
--- a/actionpack/test/template/translation_helper_test.rb | |
+++ b/actionpack/test/template/translation_helper_test.rb | |
@@ -53,6 +53,12 @@ class TranslationHelperTest < ActiveSupport::TestCase | |
assert_equal false, I18n.translate(:"translations.missing").html_safe? | |
end | |
+ def test_i18n_translate_returns_unsafe_even_if_using_html_rescue_format | |
+ expected = '<span class="translation_missing" title="translation missing: en.translations.missing">Missing</span>' | |
+ assert_equal expected, I18n.translate(:"translations.missing", :rescue_format => :html) | |
+ assert_equal false, I18n.translate(:"translations.missing", :rescue_format => :html).html_safe? | |
+ end | |
+ | |
def test_translation_returning_an_array | |
expected = %w(foo bar) | |
assert_equal expected, translate(:"translations.array") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment