mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Refactored context
This commit is contained in:
parent
4ce1bc908f
commit
a7cc498dca
4 changed files with 8 additions and 13 deletions
|
@ -14,7 +14,7 @@ describe "Context" do
|
|||
it "sets content type" do
|
||||
kemal = Kemal::Handler.new
|
||||
kemal.add_route "GET", "/" do |env|
|
||||
env.set_content_type "application/json"
|
||||
env.content_type = "application/json"
|
||||
end
|
||||
request = HTTP::Request.new("GET", "/")
|
||||
response = kemal.call(request)
|
||||
|
@ -37,7 +37,7 @@ describe "Context" do
|
|||
it "sets response headers" do
|
||||
kemal = Kemal::Handler.new
|
||||
kemal.add_route "GET", "/" do |env|
|
||||
env.set_header "Accept-Language", "tr"
|
||||
env.add_header "Accept-Language", "tr"
|
||||
end
|
||||
request = HTTP::Request.new("GET", "/")
|
||||
response = kemal.call(request)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue