1
0
Fork 0
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:
Guo Xiang Tan 2014-07-09 08:50:51 +08:00
parent 095a54502e
commit 533472dfe9

View file

@ -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',