diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-30 20:06:41 -0600 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-30 20:06:41 -0600 |
commit | 119a41e21ddfe220d1d6e92102b65141a0e2299d (patch) | |
tree | 836dd10b18b0a727d75ffd999dd8533b80716a0f /actionpack/test | |
parent | 3b3c0507e2f67a0f64dc04b396c1d13411ab5890 (diff) | |
parent | eb5e6fe713756b36ee6df9b04f28cfb8bae60dbc (diff) | |
download | rails-119a41e21ddfe220d1d6e92102b65141a0e2299d.tar.gz rails-119a41e21ddfe220d1d6e92102b65141a0e2299d.tar.bz2 rails-119a41e21ddfe220d1d6e92102b65141a0e2299d.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/polymorphic_routes_test.rb | 18 |
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 |