From 45db66de56d4f5c4cd83aba782015d5ce752f3a2 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 24 Jan 2005 13:48:24 +0000 Subject: Added :encode option to mail_to that'll allow you to masquarede the email address behind javascript or hex encoding #494 [Lucas Carlson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@493 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/tag_helper_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb index c3289af50c..2db1bac238 100644 --- a/actionpack/test/template/tag_helper_test.rb +++ b/actionpack/test/template/tag_helper_test.rb @@ -14,5 +14,17 @@ class TagHelperTest < Test::Unit::TestCase assert_equal "Create", content_tag("a", "Create", "href" => "create") end + def test_mail_to_with_javascript + assert_equal "", mail_to("me@domain.com", "My email", :encode => "javascript") + end + + def test_mail_to_with_hex + assert_equal "My email", mail_to("me@domain.com", "My email", :encode => "hex") + end + + def test_mail_to + assert_equal "My email", mail_to("me@domain.com", "My email") + end + # FIXME: Test form tag end \ No newline at end of file -- cgit v1.2.3