From 4bb26dd7b298b08f53c7e157ddc19dc7febcf37e Mon Sep 17 00:00:00 2001 From: Sam Pohlenz Date: Wed, 3 Apr 2013 14:42:48 +1030 Subject: Add block support for the helper --- actionpack/test/template/url_helper_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index 88c4b72ad7..e7b04d40c0 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -538,6 +538,16 @@ class UrlHelperTest < ActiveSupport::TestCase assert mail_to("david@loudthinking.com").html_safe? end + def test_mail_to_with_block + assert_dom_equal %{Email me}, + mail_to('me@example.com') { content_tag(:span, 'Email me') } + end + + def test_link_tag_with_block_and_options + assert_dom_equal %{Email me}, + mail_to('me@example.com', cc: "ccaddress@example.com", class: "special") { content_tag(:span, 'Email me') } + end + def protect_against_forgery? self.request_forgery end -- cgit v1.2.3