diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-22 00:58:22 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-22 00:58:22 -0500 |
commit | 673cacef0d06c600527b0f0763a255ce184ba549 (patch) | |
tree | f545d35bcbaaa6569e6a209c7bb1517ab909463e /actionview/test/template/form_helper_test.rb | |
parent | 6e6c76d2ffb6eb2e72bcd7da37f6c648315bfc1c (diff) | |
parent | 1161d1057c58021af6c2d48d65911c58b5ecde2d (diff) | |
download | rails-673cacef0d06c600527b0f0763a255ce184ba549.tar.gz rails-673cacef0d06c600527b0f0763a255ce184ba549.tar.bz2 rails-673cacef0d06c600527b0f0763a255ce184ba549.zip |
Merge pull request #14835 from zzak/test_form_helper_label_with_block_and_html
Add test for using ActionView::Helpers::FormHelper.label with block and html
Diffstat (limited to 'actionview/test/template/form_helper_test.rb')
-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>', |