From 4de8c63abbcaecbe72b925aedb8196c812463705 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 23 Jun 2007 17:11:01 +0000 Subject: Fixed that link_to with an href of # when using :method will not allow for click-through without JavaScript (closes #7037) [stevenbristol/josh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7096 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/url_helper_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index 1a5521b3e4..32696165e9 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -158,6 +158,13 @@ class UrlHelperTest < Test::Unit::TestCase ) end + def test_link_tag_using_delete_javascript_and_href + assert_dom_equal( + "Destroy", + link_to("Destroy", "http://www.example.com", :method => :delete, :href => '#') + ) + end + def test_link_tag_using_post_javascript_and_confirm assert_dom_equal( "Hello", -- cgit v1.2.3