提交 6c5f1692 编写于 作者: G Guo Xiang Tan

Update outdated test.

The current test is asserting against an outdated version of
Request#method where HEAD requests are treated as GET requests.
上级 e0c6b35d
......@@ -647,12 +647,9 @@ class RequestMethod < BaseRequestTest
end
end
test "allow method hacking on post" do
%w(GET OPTIONS PATCH PUT POST DELETE).each do |method|
request = stub_request 'REQUEST_METHOD' => method.to_s.upcase
assert_equal(method == "HEAD" ? "GET" : method, request.method)
end
test "method returns original value of environment request method on POST" do
request = stub_request('rack.methodoverride.original_method' => 'POST')
assert_equal 'POST', request.method
end
test "invalid method hacking on post raises exception" do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册