aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-11-30 17:03:38 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2008-11-30 17:04:24 -0800
commit93456a2ed275575a03bd2d6234095395dee6a655 (patch)
treef3042fd13c59345226ea7633f2798728630d9bf0 /actionpack/test/controller
parentcfb2126726f34baedfab971785ad7ff19a7f54ce (diff)
downloadrails-93456a2ed275575a03bd2d6234095395dee6a655.tar.gz
rails-93456a2ed275575a03bd2d6234095395dee6a655.tar.bz2
rails-93456a2ed275575a03bd2d6234095395dee6a655.zip
Deprecated formatted_polymorphic_url
Diffstat (limited to 'actionpack/test/controller')
-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