diff options
author | Zachary Scott <e@zzak.io> | 2014-04-22 10:51:54 +0900 |
---|---|---|
committer | Zachary Scott <e@zzak.io> | 2014-04-22 10:51:54 +0900 |
commit | 1161d1057c58021af6c2d48d65911c58b5ecde2d (patch) | |
tree | f545d35bcbaaa6569e6a209c7bb1517ab909463e /actionview/test | |
parent | 6e6c76d2ffb6eb2e72bcd7da37f6c648315bfc1c (diff) | |
download | rails-1161d1057c58021af6c2d48d65911c58b5ecde2d.tar.gz rails-1161d1057c58021af6c2d48d65911c58b5ecde2d.tar.bz2 rails-1161d1057c58021af6c2d48d65911c58b5ecde2d.zip |
Add test for using ActionView::Helpers::FormHelper.label with block and html
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/form_helper_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb index 90fe9fdc6a..0ad0ae6b4b 100644 --- a/actionview/test/template/form_helper_test.rb +++ b/actionview/test/template/form_helper_test.rb @@ -265,6 +265,13 @@ class FormHelperTest < ActionView::TestCase ) end + def test_label_with_block_and_html + assert_dom_equal( + '<label for="post_terms">Accept <a href="/terms">Terms</a>.</label>', + label(:post, :terms) { 'Accept <a href="/terms">Terms</a>.'.html_safe } + ) + end + def test_label_with_block_and_options assert_dom_equal( '<label for="my_for">The title, please:</label>', |