From 93456a2ed275575a03bd2d6234095395dee6a655 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 30 Nov 2008 17:03:38 -0800 Subject: Deprecated formatted_polymorphic_url --- actionpack/test/controller/polymorphic_routes_test.rb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'actionpack/test/controller') 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 -- cgit v1.2.3