diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-04-04 21:25:44 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-04-04 21:25:47 -0300 |
commit | e936cf9c47e716a32b75703cb1a8badf96be8a6b (patch) | |
tree | 0ea2471df0eeff401de009c63469ca0aa0134421 /actionpack/test/template | |
parent | aa3b6837b250db0a0df4c9779e0370e55ef3eb7f (diff) | |
download | rails-e936cf9c47e716a32b75703cb1a8badf96be8a6b.tar.gz rails-e936cf9c47e716a32b75703cb1a8badf96be8a6b.tar.bz2 rails-e936cf9c47e716a32b75703cb1a8badf96be8a6b.zip |
Ensure mail_to helper does not modify the given html options hash
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/url_helper_test.rb | 8 |
1 files changed, 7 insertions, 1 deletions
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 %{<a class="special" href="mailto:me@example.com?cc=ccaddress%40example.com"><span>Email me</span></a>}, 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 |