mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Test using default option as symbol added for human_attribute_name
This commit is contained in:
parent
33b0a30fcc
commit
7c920631ec
1 changed files with 5 additions and 0 deletions
|
@ -21,6 +21,11 @@ class ActiveModelI18nTests < ActiveModel::TestCase
|
|||
assert_equal 'name default attribute', Person.human_attribute_name('name', :default => "name default attribute")
|
||||
end
|
||||
|
||||
def test_translated_model_attributes_using_default_option_as_symbol
|
||||
I18n.backend.store_translations 'en', :default_name => 'name default attribute'
|
||||
assert_equal 'name default attribute', Person.human_attribute_name('name', :default => :default_name)
|
||||
end
|
||||
|
||||
def test_translated_model_attributes_falling_back_to_default
|
||||
assert_equal 'Name', Person.human_attribute_name('name')
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue