From e936cf9c47e716a32b75703cb1a8badf96be8a6b Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Thu, 4 Apr 2013 21:25:44 -0300 Subject: Ensure mail_to helper does not modify the given html options hash --- actionpack/test/template/url_helper_test.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index e7b04d40c0..9b4c419807 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -543,11 +543,17 @@ class UrlHelperTest < ActiveSupport::TestCase mail_to('me@example.com') { content_tag(:span, 'Email me') } end - def test_link_tag_with_block_and_options + def test_mail_to_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 test_mail_to_does_not_modify_html_options_hash + options = { class: 'special' } + mail_to 'me@example.com', 'ME!', options + assert_equal({ class: 'special' }, options) + end + def protect_against_forgery? self.request_forgery end -- cgit v1.2.3