From 6c5f1692eea160f6f967d71eaca478ccfef19df8 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Tue, 8 Jul 2014 23:27:59 +0800 Subject: Update outdated test. The current test is asserting against an outdated version of Request#method where HEAD requests are treated as GET requests. --- actionpack/test/dispatch/request_test.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'actionpack') diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index 9cbd53002b..5d4bd7a224 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -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 -- cgit v1.2.3