diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2011-06-12 15:03:24 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2011-06-12 15:32:46 +0100 |
commit | 1fa059cd017c134499835593ba29620c4cd7358c (patch) | |
tree | 3e8ff090c466a8023856c59cea5b03925075c443 /actionpack/test | |
parent | cd99784d99f1700b9af05c5f01e00e988c8557d5 (diff) | |
download | rails-1fa059cd017c134499835593ba29620c4cd7358c.tar.gz rails-1fa059cd017c134499835593ba29620c4cd7358c.tar.bz2 rails-1fa059cd017c134499835593ba29620c4cd7358c.zip |
Define ActiveSupport#to_param as to_str - closes #1663
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/url_helper_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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 '<a href="/">Example site</a>', out end + def test_link_tag_with_html_safe_string + assert_dom_equal( + "<a href=\"/article/Gerd_M%C3%BCller\">Gerd Müller</a>", + 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) |