aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/polymorphic_routes_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/polymorphic_routes_test.rb')
-rw-r--r--actionpack/test/controller/polymorphic_routes_test.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/actionpack/test/controller/polymorphic_routes_test.rb b/actionpack/test/controller/polymorphic_routes_test.rb
index 42dbea3b8f..09c7f74617 100644
--- a/actionpack/test/controller/polymorphic_routes_test.rb
+++ b/actionpack/test/controller/polymorphic_routes_test.rb
@@ -71,20 +71,22 @@ uses_mocha 'polymorphic URL helpers' do
polymorphic_url(@article, :param1 => '10')
end
- def test_formatted_url_helper
- expects(:formatted_article_url).with(@article, :pdf)
- formatted_polymorphic_url([@article, :pdf])
+ def test_formatted_url_helper_is_deprecated
+ expects(:articles_url).with(:format => :pdf)
+ assert_deprecated do
+ formatted_polymorphic_url([@article, :pdf])
+ end
end
def test_format_option
@article.save
- expects(:formatted_article_url).with(@article, :pdf)
+ expects(:article_url).with(@article, :format => :pdf)
polymorphic_url(@article, :format => :pdf)
end
def test_format_option_with_url_options
@article.save
- expects(:formatted_article_url).with(@article, :pdf, :param1 => '10')
+ expects(:article_url).with(@article, :format => :pdf, :param1 => '10')
polymorphic_url(@article, :format => :pdf, :param1 => '10')
end
@@ -157,14 +159,14 @@ uses_mocha 'polymorphic URL helpers' do
def test_nesting_with_array_containing_singleton_resource_and_format
@tag = Tag.new
@tag.save
- expects(:formatted_article_response_tag_url).with(@article, @tag, :pdf)
- formatted_polymorphic_url([@article, :response, @tag, :pdf])
+ expects(:article_response_tag_url).with(@article, @tag, :format => :pdf)
+ polymorphic_url([@article, :response, @tag], :format => :pdf)
end
def test_nesting_with_array_containing_singleton_resource_and_format_option
@tag = Tag.new
@tag.save
- expects(:formatted_article_response_tag_url).with(@article, @tag, :pdf)
+ expects(:article_response_tag_url).with(@article, @tag, :format => :pdf)
polymorphic_url([@article, :response, @tag], :format => :pdf)
end