diff options
Diffstat (limited to 'actionview/test/template/form_helper_test.rb')
-rw-r--r-- | actionview/test/template/form_helper_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb index 0ad0ae6b4b..7b680aac08 100644 --- a/actionview/test/template/form_helper_test.rb +++ b/actionview/test/template/form_helper_test.rb @@ -19,6 +19,9 @@ class FormHelperTest < ActionView::TestCase attributes: { post: { cost: "Total cost" + }, + :"post/language" => { + spanish: "Espanol" } } }, @@ -154,6 +157,12 @@ class FormHelperTest < ActionView::TestCase end end + def test_label_with_human_attribute_name_and_options + with_locale :label do + assert_dom_equal('<label for="post_language_spanish">Espanol</label>', label(:post, :language, value: "spanish")) + end + end + def test_label_with_locales_symbols with_locale :label do assert_dom_equal('<label for="post_body">Write entire text here</label>', label(:post, :body)) |