aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-05-08 03:33:22 -0700
committerJosé Valim <jose.valim@gmail.com>2011-05-08 03:33:22 -0700
commit30db3a82f653e7d7215e41bec525932cf5b17de1 (patch)
treebb59f9fd10c818c4ca89ad1e2b18cedad37a0759 /actionpack
parentad129639c7e72c3ba686db6202a4bff2cb2cfbfe (diff)
parent17a91a6ef93008170e50c073d1c3794f038a0a33 (diff)
downloadrails-30db3a82f653e7d7215e41bec525932cf5b17de1.tar.gz
rails-30db3a82f653e7d7215e41bec525932cf5b17de1.tar.bz2
rails-30db3a82f653e7d7215e41bec525932cf5b17de1.zip
Merge pull request #430 from dlee/methodoverride
Logs should show overridden method; Issue 426
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/dispatch/request_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb
index d128006404..25b1b4f745 100644
--- a/actionpack/test/dispatch/request_test.rb
+++ b/actionpack/test/dispatch/request_test.rb
@@ -358,6 +358,13 @@ class RequestTest < ActiveSupport::TestCase
assert request.head?
end
+ test "post masquerading as put" do
+ request = stub_request 'REQUEST_METHOD' => 'PUT', "rack.methodoverride.original_method" => "POST"
+ assert_equal "POST", request.method
+ assert_equal "PUT", request.request_method
+ assert request.put?
+ end
+
test "xml format" do
request = stub_request
request.expects(:parameters).at_least_once.returns({ :format => 'xml' })