diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-10-29 13:57:00 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-10-29 13:57:00 -0200 |
commit | 008154e23705e732f5fa5292aa60605efb92d163 (patch) | |
tree | 34c7af070fcda2420814596f383738b2ec4eb68b /actionpack/test/template | |
parent | d1c95d912ec39e7e374aee605a1d6fb11f8521d7 (diff) | |
download | rails-008154e23705e732f5fa5292aa60605efb92d163.tar.gz rails-008154e23705e732f5fa5292aa60605efb92d163.tar.bz2 rails-008154e23705e732f5fa5292aa60605efb92d163.zip |
Fix failing tests and use new hash style in deprecation messages
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/form_tag_helper_test.rb | 6 | ||||
-rw-r--r-- | actionpack/test/template/url_helper_test.rb | 18 |
2 files changed, 12 insertions, 12 deletions
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb index 945dff2a29..0a94fa079b 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionpack/test/template/form_tag_helper_test.rb @@ -411,7 +411,7 @@ class FormTagHelperTest < ActionView::TestCase end def test_submit_tag_with_deprecated_confirmation - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %(<input name='commit' type='submit' value='Save' data-confirm="Are you sure?" />), submit_tag("Save", :confirm => "Are you sure?") @@ -478,7 +478,7 @@ class FormTagHelperTest < ActionView::TestCase end def test_button_tag_with_deprecated_confirmation - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %(<button name="button" type="submit" data-confirm="Are you sure?">Save</button>), button_tag("Save", :type => "submit", :confirm => "Are you sure?") @@ -494,7 +494,7 @@ class FormTagHelperTest < ActionView::TestCase end def test_image_submit_tag_with_deprecated_confirmation - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %(<input type="image" src="/images/save.gif" data-confirm="Are you sure?" />), image_submit_tag("save.gif", :confirm => "Are you sure?") diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index bbfdf7f944..1bb625213d 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -95,7 +95,7 @@ class UrlHelperTest < ActiveSupport::TestCase end def test_button_to_with_deprecated_confirm - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %{<form method="post" action="http://www.example.com" class="button_to"><div><input data-confirm="Are you sure?" type="submit" value="Hello" /></div></form>}, button_to("Hello", "http://www.example.com", confirm: "Are you sure?") @@ -111,7 +111,7 @@ class UrlHelperTest < ActiveSupport::TestCase end def test_button_to_with_javascript_deprecated_disable_with - assert_deprecated ":disable_with option is deprecated and will be removed from Rails 4.1. Use ':data => { :disable_with => \'Text\' }' instead" do + assert_deprecated ":disable_with option is deprecated and will be removed from Rails 4.1. Use 'data: { disable_with: \'Text\' }' instead" do assert_dom_equal( %{<form method="post" action="http://www.example.com" class="button_to"><div><input data-disable-with="Greeting..." type="submit" value="Hello" /></div></form>}, button_to("Hello", "http://www.example.com", disable_with: "Greeting...") @@ -134,7 +134,7 @@ class UrlHelperTest < ActiveSupport::TestCase end def test_button_to_with_remote_and_javascript_with_deprecated_confirm - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %{<form method="post" action="http://www.example.com" class="button_to" data-remote="true"><div><input data-confirm="Are you sure?" type="submit" value="Hello" /></div></form>}, button_to("Hello", "http://www.example.com", remote: true, confirm: "Are you sure?") @@ -150,7 +150,7 @@ class UrlHelperTest < ActiveSupport::TestCase end def test_button_to_with_remote_and_javascript_deprecated_disable_with - assert_deprecated ":disable_with option is deprecated and will be removed from Rails 4.1. Use ':data => { :disable_with => \'Text\' }' instead" do + assert_deprecated ":disable_with option is deprecated and will be removed from Rails 4.1. Use 'data: { disable_with: \'Text\' }' instead" do assert_dom_equal( %{<form method="post" action="http://www.example.com" class="button_to" data-remote="true"><div><input data-disable-with="Greeting..." type="submit" value="Hello" /></div></form>}, button_to("Hello", "http://www.example.com", remote: true, disable_with: "Greeting...") @@ -267,19 +267,19 @@ class UrlHelperTest < ActiveSupport::TestCase end def test_link_tag_with_deprecated_confirm - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %{<a href="http://www.example.com" data-confirm="Are you sure?">Hello</a>}, link_to("Hello", "http://www.example.com", confirm: "Are you sure?") ) end - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %{<a href="http://www.example.com" data-confirm="You cant possibly be sure, can you?">Hello</a>}, link_to("Hello", "http://www.example.com", confirm: "You cant possibly be sure, can you?") ) end - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %{<a href="http://www.example.com" data-confirm="You cant possibly be sure,\n can you?">Hello</a>}, link_to("Hello", "http://www.example.com", confirm: "You cant possibly be sure,\n can you?") @@ -351,7 +351,7 @@ class UrlHelperTest < ActiveSupport::TestCase end def test_link_tag_using_post_javascript_and_with_deprecated_confirm - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %{<a href="http://www.example.com" data-method="post" rel="nofollow" data-confirm="Are you serious?">Hello</a>}, link_to("Hello", "http://www.example.com", method: :post, confirm: "Are you serious?") @@ -367,7 +367,7 @@ class UrlHelperTest < ActiveSupport::TestCase end def test_link_tag_using_delete_javascript_and_href_and_with_deprecated_confirm - assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use ':data => { :confirm => \'Text\' }' instead" do + assert_deprecated ":confirm option is deprecated and will be removed from Rails 4.1. Use 'data: { confirm: \'Text\' }' instead" do assert_dom_equal( %{<a href="\#" rel="nofollow" data-confirm="Are you serious?" data-method="delete">Destroy</a>}, link_to("Destroy", "http://www.example.com", method: :delete, href: '#', confirm: "Are you serious?") |