From 5b3bc3139a1b15054f26092eb95a5fbc8fdc07aa Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 16 Jun 2005 06:00:18 +0000 Subject: Added a third parameter to TextHelper#auto_link called href_options for specifying additional tag options on the links generated #1401 [tyler.kovacs@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1432 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/text_helper_test.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb index 81aca6f638..722f08a7cf 100644 --- a/actionpack/test/template/text_helper_test.rb +++ b/actionpack/test/template/text_helper_test.rb @@ -4,6 +4,7 @@ require File.dirname(__FILE__) + '/../../../activesupport/lib/active_support/cor class TextHelperTest < Test::Unit::TestCase include ActionView::Helpers::TextHelper + include ActionView::Helpers::TagHelper def test_simple_format assert_equal "

crazy\n
cross\n
platform linebreaks

", simple_format("crazy\r\n cross\r platform linebreaks") @@ -77,6 +78,7 @@ class TextHelperTest < Test::Unit::TestCase email_result = %{#{email_raw}} link_raw = 'http://www.rubyonrails.com' link_result = %{#{link_raw}} + link_result_with_options = %{#{link_raw}} link2_raw = 'www.rubyonrails.com' link2_result = %{#{link2_raw}} @@ -90,6 +92,7 @@ class TextHelperTest < Test::Unit::TestCase assert_equal %(Go to #{link2_raw}), auto_link("Go to #{link2_raw}", :email_addresses) assert_equal %(

Link #{link2_result}

), auto_link("

Link #{link2_raw}

") assert_equal %(

#{link2_result} Link

), auto_link("

#{link2_raw} Link

") + assert_equal %(

Link #{link_result_with_options}

), auto_link("

Link #{link_raw}

", :all, {:target => "_blank"}) end def test_sanitize_form -- cgit v1.2.3