test/spec_methodoverride.rb in rack-1.6.2 vs test/spec_methodoverride.rb in rack-1.6.3
- old
+ new
@@ -70,6 +70,13 @@
rescue EOFError
end
env["REQUEST_METHOD"].should.equal "POST"
end
+
+ should "not modify REQUEST_METHOD for POST requests when the params are unparseable" do
+ env = Rack::MockRequest.env_for("/", :method => "POST", :input => "(%bad-params%)")
+ app.call env
+
+ env["REQUEST_METHOD"].should.equal "POST"
+ end
end