mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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.
This commit is contained in:
parent
095a54502e
commit
533472dfe9
1 changed files with 0 additions and 11 deletions
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue