Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Test falling back to default added for human_attribute_name

  • Loading branch information...
commit 0dbf4ac709c0c31d4d6664bcb53b861c6d6b0157 1 parent b870d67
@spastorino spastorino authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 activemodel/test/cases/translation_test.rb
View
4 activemodel/test/cases/translation_test.rb
@@ -21,6 +21,10 @@ 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_falling_back_to_default
+ assert_equal 'Name', Person.human_attribute_name('name')
+ 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)
Please sign in to comment.
Something went wrong with that request. Please try again.