From 533472dfe9d9252a2df3a4ce76d867d8df54d375 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 9 Jul 2014 08:50:51 +0800 Subject: Remove redundant test. Since we're stubbing the request, the test is actually just asserting that `@method = env['REQUEST_METHOD']`. In order to the test against the methodoverride middleware, we should test it against an actual request. However, Rack is already covering this scenario so we can remove this test. --- actionpack/test/dispatch/request_test.rb | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'actionpack/test/dispatch/request_test.rb') diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index db52bca441..7b00998ac9 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -664,17 +664,6 @@ class RequestMethod < BaseRequestTest end end - test "restrict method hacking" do - [:get, :patch, :put, :delete].each do |method| - request = stub_request( - 'action_dispatch.request.request_parameters' => { :_method => 'put' }, - 'REQUEST_METHOD' => method.to_s.upcase - ) - - assert_equal method.to_s.upcase, request.method - end - end - test "post masquerading as patch" do request = stub_request( 'REQUEST_METHOD' => 'PATCH', -- cgit v1.2.3