1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Test using default option added for human_attribute_name

This commit is contained in:
Santiago Pastorino 2010-12-05 12:31:06 -02:00
parent 48386d245b
commit b870d67290

View file

@ -17,6 +17,10 @@ class ActiveModelI18nTests < ActiveModel::TestCase
assert_equal 'name default attribute', Person.human_attribute_name('name')
end
def test_translated_model_attributes_using_default_option
assert_equal 'name default attribute', Person.human_attribute_name('name', :default => "name default attribute")
end
def test_translated_model_attributes_with_symbols
I18n.backend.store_translations 'en', :activemodel => {:attributes => {:person => {:name => 'person name attribute'} } }
assert_equal 'person name attribute', Person.human_attribute_name(:name)