aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/activerecord')
-rw-r--r--actionview/test/activerecord/polymorphic_routes_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/actionview/test/activerecord/polymorphic_routes_test.rb b/actionview/test/activerecord/polymorphic_routes_test.rb
index fef27ef492..f6ff3069f8 100644
--- a/actionview/test/activerecord/polymorphic_routes_test.rb
+++ b/actionview/test/activerecord/polymorphic_routes_test.rb
@@ -242,6 +242,21 @@ class PolymorphicRoutesTest < ActionController::TestCase
end
end
+ def test_new_record_arguments
+ params = nil
+ extend Module.new {
+ define_method("projects_url") { |*args|
+ params = args
+ super(*args)
+ }
+ }
+
+ with_test_routes do
+ assert_equal "http://example.com/projects", polymorphic_url(@project)
+ assert_equal [], params
+ end
+ end
+
def test_with_destroyed_record
with_test_routes do
@project.destroy