test/spec_methodoverride.rb in rack-1.2.8 vs test/spec_methodoverride.rb in rack-1.3.0.beta
- old
+ new
@@ -20,15 +20,15 @@
end
should "modify REQUEST_METHOD for POST requests when X-HTTP-Method-Override is set" do
env = Rack::MockRequest.env_for("/",
:method => "POST",
- "HTTP_X_HTTP_METHOD_OVERRIDE" => "PUT"
+ "HTTP_X_HTTP_METHOD_OVERRIDE" => "PATCH"
)
app = Rack::MethodOverride.new(lambda{|envx| Rack::Request.new(envx) })
req = app.call(env)
- req.env["REQUEST_METHOD"].should.equal "PUT"
+ req.env["REQUEST_METHOD"].should.equal "PATCH"
end
should "not modify REQUEST_METHOD if the method is unknown" do
env = Rack::MockRequest.env_for("/", :method => "POST", :input => "_method=foo")
app = Rack::MethodOverride.new(lambda{|envx| Rack::Request.new(envx) })