diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-27 11:49:34 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-27 11:49:34 -0300 |
commit | 85c49f5a6431b36c9c36c367b5d9edaa8b79f733 (patch) | |
tree | a1f98d7eac044b6d586ae2eadda01917286b811e /actionview/test | |
parent | f3ae917be46a2fc4c38691a957330310ae7b3b29 (diff) | |
parent | 362557eb4169a541063468b489931648665f1fa3 (diff) | |
download | rails-85c49f5a6431b36c9c36c367b5d9edaa8b79f733.tar.gz rails-85c49f5a6431b36c9c36c367b5d9edaa8b79f733.tar.bz2 rails-85c49f5a6431b36c9c36c367b5d9edaa8b79f733.zip |
Merge pull request #19102 from ulissesalmeida/fix-regression-default-translation
Fix regression when passing a value different of String.
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/translation_helper_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionview/test/template/translation_helper_test.rb b/actionview/test/template/translation_helper_test.rb index 8fde478ac9..ef4d13efa7 100644 --- a/actionview/test/template/translation_helper_test.rb +++ b/actionview/test/template/translation_helper_test.rb @@ -180,6 +180,11 @@ class TranslationHelperTest < ActiveSupport::TestCase assert_equal 'A Generic String', translation end + def test_translate_with_object_default + translation = translate(:'translations.missing', default: 123) + assert_equal 123, translation + end + def test_translate_with_array_of_string_defaults translation = translate(:'translations.missing', default: ['A Generic String', 'Second generic string']) assert_equal 'A Generic String', translation |