aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2015-04-05 02:53:54 +0930
committerMatthew Draper <matthew@trebex.net>2015-04-05 02:55:00 +0930
commit07875e2aa6ddf4c37b5997d6834bcb27ea50d02c (patch)
treec33e9373a892ace84198c6608d60926feed3633b /actionview/test
parent191facc857bb4fb52078fb544c6bc1613a81cc80 (diff)
parent6f3c65f6300f157e6ae5bfb839064383f3de11a9 (diff)
downloadrails-07875e2aa6ddf4c37b5997d6834bcb27ea50d02c.tar.gz
rails-07875e2aa6ddf4c37b5997d6834bcb27ea50d02c.tar.bz2
rails-07875e2aa6ddf4c37b5997d6834bcb27ea50d02c.zip
Merge pull request #19649 from aprescott/allow-array-defaults
Allow an array to be a default translation value.
Diffstat (limited to 'actionview/test')
-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 c4daaae221..df096b3c3a 100644
--- a/actionview/test/template/translation_helper_test.rb
+++ b/actionview/test/template/translation_helper_test.rb
@@ -195,6 +195,11 @@ class TranslationHelperTest < ActiveSupport::TestCase
assert_equal 'A Generic String', translation
end
+ def test_translate_with_array_of_array_default
+ translation = translate(:'translations.missing', default: [[]])
+ assert_equal [], translation
+ end
+
def test_translate_does_not_change_options
options = {}
translate(:'translations.missing', options)