From 38dcb27e7242a8c23095b359e015eb4246540317 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 1 May 2014 11:31:59 -0700 Subject: add a test for passing two models to the polymorphic_url method --- actionview/test/activerecord/polymorphic_routes_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actionview/test') 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 -- cgit v1.2.3