aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/url_helper_test.rb
diff options
context:
space:
mode:
authorKuldeep Aggarwal <kd.engineer@yahoo.co.in>2014-09-13 00:57:53 +0530
committerKuldeep Aggarwal <kd.engineer@yahoo.co.in>2014-10-02 19:38:36 +0530
commita13ad4a6c1e72edc3ec03e98c94fe865ad147d2e (patch)
tree7f2b7ae98adff47848f9533e9f2509d042f73c6e /actionview/test/template/url_helper_test.rb
parent7b740f31cc6f88fe20a51eb7da1468082e6fdb5a (diff)
downloadrails-a13ad4a6c1e72edc3ec03e98c94fe865ad147d2e.tar.gz
rails-a13ad4a6c1e72edc3ec03e98c94fe865ad147d2e.tar.bz2
rails-a13ad4a6c1e72edc3ec03e98c94fe865ad147d2e.zip
do not generate blank options in mailTo
when mail_to generate blank options for any passed options(cc, bcc, body, subject) then MICROSOFT OUTLOOK treats it differently and set wrong values in different options.
Diffstat (limited to 'actionview/test/template/url_helper_test.rb')
-rw-r--r--actionview/test/template/url_helper_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionview/test/template/url_helper_test.rb b/actionview/test/template/url_helper_test.rb
index e0678ae1f7..caff0dc6f6 100644
--- a/actionview/test/template/url_helper_test.rb
+++ b/actionview/test/template/url_helper_test.rb
@@ -496,6 +496,11 @@ class UrlHelperTest < ActiveSupport::TestCase
%{<a href="mailto:me@example.com?cc=ccaddress%40example.com&amp;bcc=bccaddress%40example.com&amp;body=This%20is%20the%20body%20of%20the%20message.&amp;subject=This%20is%20an%20example%20email">My email</a>},
mail_to("me@example.com", "My email", cc: "ccaddress@example.com", bcc: "bccaddress@example.com", subject: "This is an example email", body: "This is the body of the message.")
)
+
+ assert_dom_equal(
+ %{<a href="mailto:me@example.com?body=This%20is%20the%20body%20of%20the%20message.&amp;subject=This%20is%20an%20example%20email">My email</a>},
+ mail_to("me@example.com", "My email", cc: '', bcc: '', subject: "This is an example email", body: "This is the body of the message.")
+ )
end
def test_mail_to_with_img