mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Remove Kemal::OverrideMethodHandler
This commit is contained in:
parent
21ab64511a
commit
207f38251a
2 changed files with 0 additions and 62 deletions
|
@ -1,29 +0,0 @@
|
|||
require "./spec_helper"
|
||||
|
||||
describe "Kemal::OverrideMethodHandler" do
|
||||
it "does not override method without _method for POST requests" do
|
||||
request = HTTP::Request.new(
|
||||
"POST",
|
||||
"/",
|
||||
body: "_not_method=PATCH",
|
||||
headers: HTTP::Headers{"Content-Type" => "application/x-www-form-urlencoded; charset=UTF-8"}
|
||||
)
|
||||
|
||||
context = create_request_and_return_io_and_context(Kemal::OverrideMethodHandler::INSTANCE, request)[1]
|
||||
|
||||
context.request.method.should eq "POST"
|
||||
end
|
||||
|
||||
it "overrides method with _method for POST requests" do
|
||||
request = HTTP::Request.new(
|
||||
"POST",
|
||||
"/",
|
||||
body: "_method=PATCH",
|
||||
headers: HTTP::Headers{"Content-Type" => "application/x-www-form-urlencoded; charset=UTF-8"}
|
||||
)
|
||||
|
||||
context = create_request_and_return_io_and_context(Kemal::OverrideMethodHandler::INSTANCE, request)[1]
|
||||
|
||||
context.request.method.should eq "PATCH"
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue