diff options
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/activerecord/polymorphic_routes_test.rb | 8 |
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 |