diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2015-12-18 18:47:59 -0200 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2015-12-18 18:47:59 -0200 |
commit | cbf827bc9c6592d3bdf117710a13dc57fc512e60 (patch) | |
tree | a7192c3998eff85a696d3c798617a1e534d8ecb2 /actionview/test/template | |
parent | 7eae0bb88e5259939f35023b11773f947b775d43 (diff) | |
parent | c1dbb13eacf0e579f351a46c9ee2ec845ae0cc2d (diff) | |
download | rails-cbf827bc9c6592d3bdf117710a13dc57fc512e60.tar.gz rails-cbf827bc9c6592d3bdf117710a13dc57fc512e60.tar.bz2 rails-cbf827bc9c6592d3bdf117710a13dc57fc512e60.zip |
Merge pull request #22462 from lxsameer/i18n_html_wrap
wrapping i18n missing keys made optional
Diffstat (limited to 'actionview/test/template')
-rw-r--r-- | actionview/test/template/translation_helper_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionview/test/template/translation_helper_test.rb b/actionview/test/template/translation_helper_test.rb index 631bceadd8..597936d7ae 100644 --- a/actionview/test/template/translation_helper_test.rb +++ b/actionview/test/template/translation_helper_test.rb @@ -54,6 +54,16 @@ class TranslationHelperTest < ActiveSupport::TestCase end end + def test_returns_missing_tranlation_message_without_span_wrap + old_value = ActionView::Base.debug_missing_translation + ActionView::Base.debug_missing_translation = false + + expected = 'translation missing: en.translations.missing' + assert_equal expected, translate(:"translations.missing") + ensure + ActionView::Base.debug_missing_translation = old_value + end + def test_returns_missing_translation_message_wrapped_into_span expected = '<span class="translation_missing" title="translation missing: en.translations.missing">Missing</span>' assert_equal expected, translate(:"translations.missing") |