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:
parent
48386d245b
commit
b870d67290
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue