aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/translation_test.rb
diff options
context:
space:
mode:
authorJohn Firebaugh <john_firebaugh@bigfix.com>2010-08-12 11:43:10 -0700
committerJosé Valim <jose.valim@gmail.com>2010-09-25 10:59:54 +0200
commit75a960ca6e38ae68fd55c034272102077fd95afa (patch)
treef91226095842303acd0bf049245fd74d38a2e258 /activemodel/test/cases/translation_test.rb
parent308517e913ef1e8d9f13e023bc450374b5ed780a (diff)
downloadrails-75a960ca6e38ae68fd55c034272102077fd95afa.tar.gz
rails-75a960ca6e38ae68fd55c034272102077fd95afa.tar.bz2
rails-75a960ca6e38ae68fd55c034272102077fd95afa.zip
Don't act destructively on ActiveModel::Name#human options hash. [#5366 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activemodel/test/cases/translation_test.rb')
-rw-r--r--activemodel/test/cases/translation_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activemodel/test/cases/translation_test.rb b/activemodel/test/cases/translation_test.rb
index d6942a5475..ac2e56321e 100644
--- a/activemodel/test/cases/translation_test.rb
+++ b/activemodel/test/cases/translation_test.rb
@@ -46,5 +46,11 @@ class ActiveModelI18nTests < ActiveModel::TestCase
I18n.backend.store_translations 'en', :activemodel => {:models => {:person => 'person model'} }
assert_equal 'person model', Child.model_name.human
end
+
+ def test_human_does_not_modify_options
+ options = {:default => 'person model'}
+ Person.model_name.human(options)
+ assert_equal({:default => 'person model'}, options)
+ end
end