aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/translation_helper_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/template/translation_helper_test.rb')
-rw-r--r--actionview/test/template/translation_helper_test.rb5
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