aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/resources_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb
index 541e8270c9..79b28c0773 100644
--- a/actionpack/test/controller/resources_test.rb
+++ b/actionpack/test/controller/resources_test.rb
@@ -997,6 +997,16 @@ class ResourcesTest < ActionController::TestCase
end
end
+ def test_default_singleton_restful_route_uses_get
+ with_routing do |set|
+ set.draw do |map|
+ map.resource :product
+ end
+
+ assert_equal :get, set.named_routes.routes[:product].conditions[:method]
+ end
+ end
+
protected
def with_restful_routing(*args)
with_routing do |set|