From 1fa059cd017c134499835593ba29620c4cd7358c Mon Sep 17 00:00:00 2001 From: Andrew White Date: Sun, 12 Jun 2011 15:03:24 +0100 Subject: Define ActiveSupport#to_param as to_str - closes #1663 --- actionpack/test/template/url_helper_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actionpack/test/template/url_helper_test.rb') diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index 4aa45c8bf0..1e54f0174c 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -15,6 +15,7 @@ class UrlHelperTest < ActiveSupport::TestCase routes.draw do match "/" => "foo#bar" match "/other" => "foo#other" + match "/article/:id" => "foo#article", :as => :article end include routes.url_helpers @@ -264,6 +265,13 @@ class UrlHelperTest < ActiveSupport::TestCase assert_equal 'Example site', out end + def test_link_tag_with_html_safe_string + assert_dom_equal( + "Gerd Müller", + link_to("Gerd Müller", article_path("Gerd_Müller".html_safe)) + ) + end + def test_link_to_unless assert_equal "Showing", link_to_unless(true, "Showing", url_hash) -- cgit v1.2.3