From a769b88819ac1ad1d89a1f9138bf1546091d3744 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 3 Sep 2006 15:59:18 +0000 Subject: button_to accepts :method so you can PUT and DELETE with it. Closes #6005. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4914 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/url_helper_test.rb | 14 ++++++++++++++ 1 file changed, 14 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 4d57bc65be..77ca8094f7 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -59,6 +59,20 @@ class UrlHelperTest < Test::Unit::TestCase button_to("Hello", "http://www.example.com", :disabled => true) ) end + + def test_button_to_with_method_delete + assert_dom_equal( + "
", + button_to("Hello", "http://www.example.com", :method => :delete) + ) + end + + def test_button_to_with_method_get + assert_dom_equal( + "
", + button_to("Hello", "http://www.example.com", :method => :get) + ) + end def test_link_tag_with_straight_url assert_dom_equal "Hello", link_to("Hello", "http://www.example.com") -- cgit v1.2.3