mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
14 lines
342 B
Crystal
14 lines
342 B
Crystal
require "./spec_helper"
|
|
|
|
describe "Request" do
|
|
it "uses the last method override provided" do
|
|
request = HTTP::Request.new(
|
|
"POST",
|
|
"/",
|
|
body: "_method=PUT&_method=PATCH",
|
|
headers: HTTP::Headers{"Content-Type": "application/x-www-form-urlencoded"},
|
|
)
|
|
|
|
request.override_method.should eq("PATCH")
|
|
end
|
|
end
|