From fb8a830a329b78a5863c1dbfb70a4005d3de60ec Mon Sep 17 00:00:00 2001 From: Carlos Galdino Date: Fri, 1 Jun 2012 16:54:21 -0300 Subject: Remove `:confirm` in favor of `:data => { :confirm => 'Text' }` option This applies to the following helpers: `button_to` `button_tag` `image_submit_tag` `link_to` `submit_tag` --- actionpack/test/template/url_helper_test.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (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 62608a727f..a09409635d 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -90,7 +90,7 @@ class UrlHelperTest < ActiveSupport::TestCase def test_button_to_with_javascript_confirm assert_dom_equal( "
", - button_to("Hello", "http://www.example.com", :confirm => "Are you sure?") + button_to("Hello", "http://www.example.com", :data => { :confirm => "Are you sure?" }) ) end @@ -108,7 +108,7 @@ class UrlHelperTest < ActiveSupport::TestCase def test_button_to_with_remote_and_javascript_confirm assert_dom_equal( "
", - button_to("Hello", "http://www.example.com", :remote => true, :confirm => "Are you sure?") + button_to("Hello", "http://www.example.com", :remote => true, :data => { :confirm => "Are you sure?" }) ) end @@ -208,15 +208,15 @@ class UrlHelperTest < ActiveSupport::TestCase def test_link_tag_with_javascript_confirm assert_dom_equal( "Hello", - link_to("Hello", "http://www.example.com", :confirm => "Are you sure?") + link_to("Hello", "http://www.example.com", :data => { :confirm => "Are you sure?" }) ) assert_dom_equal( "Hello", - link_to("Hello", "http://www.example.com", :confirm => "You can't possibly be sure, can you?") + link_to("Hello", "http://www.example.com", :data => { :confirm => "You can't possibly be sure, can you?" }) ) assert_dom_equal( "Hello", - link_to("Hello", "http://www.example.com", :confirm => "You can't possibly be sure,\n can you?") + link_to("Hello", "http://www.example.com", :data => { :confirm => "You can't possibly be sure,\n can you?" }) ) end @@ -265,14 +265,14 @@ class UrlHelperTest < ActiveSupport::TestCase def test_link_tag_using_post_javascript_and_confirm assert_dom_equal( "Hello", - link_to("Hello", "http://www.example.com", :method => :post, :confirm => "Are you serious?") + link_to("Hello", "http://www.example.com", :method => :post, :data => { :confirm => "Are you serious?" }) ) end def test_link_tag_using_delete_javascript_and_href_and_confirm assert_dom_equal( "Destroy", - link_to("Destroy", "http://www.example.com", :method => :delete, :href => '#', :confirm => "Are you serious?"), + link_to("Destroy", "http://www.example.com", :method => :delete, :href => '#', :data => { :confirm => "Are you serious?" }), "When specifying url, form should be generated with it, but not this.href" ) end -- cgit v1.2.3