aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-05-01 11:31:59 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-05-12 15:54:41 -0700
commit38dcb27e7242a8c23095b359e015eb4246540317 (patch)
treed648e5a7e8928ff37e06788b35e95e85d8c9bbd2 /actionview
parentc29474ecd605f9192bcf8b623ecd0a3f69a2ad7e (diff)
downloadrails-38dcb27e7242a8c23095b359e015eb4246540317.tar.gz
rails-38dcb27e7242a8c23095b359e015eb4246540317.tar.bz2
rails-38dcb27e7242a8c23095b359e015eb4246540317.zip
add a test for passing two models to the polymorphic_url method
Diffstat (limited to 'actionview')
-rw-r--r--actionview/test/activerecord/polymorphic_routes_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionview/test/activerecord/polymorphic_routes_test.rb b/actionview/test/activerecord/polymorphic_routes_test.rb
index bcdb4f4376..eff6430e8a 100644
--- a/actionview/test/activerecord/polymorphic_routes_test.rb
+++ b/actionview/test/activerecord/polymorphic_routes_test.rb
@@ -131,6 +131,14 @@ class PolymorphicRoutesTest < ActionController::TestCase
end
end
+ def test_namespaced_model_with_name_the_same_as_namespace_omg
+ with_namespaced_routes(:blog) do
+ @blog_blog.save
+ @blog_post.save
+ assert_equal "http://example.com/blogs/#{@blog_blog.id}/posts/#{@blog_post.id}", polymorphic_url([@blog_blog, @blog_post])
+ end
+ end
+
def test_namespaced_model_with_nested_resources
with_namespaced_routes(:blog) do
@blog_post.save