aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test
diff options
context:
space:
mode:
authorZachary Scott <e@zzak.io>2014-04-22 10:51:54 +0900
committerZachary Scott <e@zzak.io>2014-04-22 10:51:54 +0900
commit1161d1057c58021af6c2d48d65911c58b5ecde2d (patch)
treef545d35bcbaaa6569e6a209c7bb1517ab909463e /actionview/test
parent6e6c76d2ffb6eb2e72bcd7da37f6c648315bfc1c (diff)
downloadrails-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.rb7
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>',