diff options
author | Guo Xiang Tan <tgx_world@hotmail.com> | 2014-07-09 08:50:51 +0800 |
---|---|---|
committer | Guo Xiang Tan <tgx_world@hotmail.com> | 2014-07-18 14:52:17 +0800 |
commit | 533472dfe9d9252a2df3a4ce76d867d8df54d375 (patch) | |
tree | 8bcff9ce9f7f3abe7deb3c19196e32d3c1dbb55c /actionpack | |
parent | 095a54502e58eac2b796500fc73c5c2afba91b04 (diff) | |
download | rails-533472dfe9d9252a2df3a4ce76d867d8df54d375.tar.gz rails-533472dfe9d9252a2df3a4ce76d867d8df54d375.tar.bz2 rails-533472dfe9d9252a2df3a4ce76d867d8df54d375.zip |
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.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 11 |
1 files changed, 0 insertions, 11 deletions
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', |