aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/mapper_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/dispatch/mapper_test.rb')
-rw-r--r--actionpack/test/dispatch/mapper_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/mapper_test.rb b/actionpack/test/dispatch/mapper_test.rb
index 5376ed70dd..bd9786899f 100644
--- a/actionpack/test/dispatch/mapper_test.rb
+++ b/actionpack/test/dispatch/mapper_test.rb
@@ -47,6 +47,15 @@ module ActionDispatch
assert_equal(/.+?/, requirements[:rest])
end
+ def test_via_scope
+ fakeset = FakeSet.new
+ mapper = Mapper.new fakeset
+ mapper.scope(via: :put) do
+ mapper.match '/', :to => 'posts#index', :as => :main
+ end
+ assert_equal ["PUT"], fakeset.conditions.first[:request_method]
+ end
+
def test_map_slash
fakeset = FakeSet.new
mapper = Mapper.new fakeset