mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Add app reference to the handlers which are bound to the app
This commit is contained in:
parent
dc93bb2235
commit
72bcac6dd5
12 changed files with 58 additions and 49 deletions
|
@ -26,9 +26,8 @@ describe "Kemal::ExceptionHandler" do
|
|||
app.get "/" do |env|
|
||||
env.response.status_code = 403
|
||||
end
|
||||
context.app = app
|
||||
subject = Kemal::ExceptionHandler.new(app)
|
||||
subject.next = Kemal::RouteHandler.new
|
||||
subject.next = app.route_handler
|
||||
subject.call(context)
|
||||
response.close
|
||||
io.rewind
|
||||
|
@ -50,9 +49,8 @@ describe "Kemal::ExceptionHandler" do
|
|||
app.get "/" do |env|
|
||||
env.response.status_code = 500
|
||||
end
|
||||
context.app = app
|
||||
subject = Kemal::ExceptionHandler.new(app)
|
||||
subject.next = Kemal::RouteHandler.new
|
||||
subject.next = app.route_handler
|
||||
subject.call(context)
|
||||
response.close
|
||||
io.rewind
|
||||
|
@ -75,9 +73,8 @@ describe "Kemal::ExceptionHandler" do
|
|||
env.response.content_type = "application/json"
|
||||
env.response.status_code = 500
|
||||
end
|
||||
context.app = app
|
||||
subject = Kemal::ExceptionHandler.new(app)
|
||||
subject.next = Kemal::RouteHandler.new
|
||||
subject.next = app.route_handler
|
||||
subject.call(context)
|
||||
response.close
|
||||
io.rewind
|
||||
|
@ -100,9 +97,8 @@ describe "Kemal::ExceptionHandler" do
|
|||
env.response.content_type = "application/json"
|
||||
env.response.status_code = 500
|
||||
end
|
||||
context.app = app
|
||||
subject = Kemal::ExceptionHandler.new(Kemal::Base.new)
|
||||
subject.next = Kemal::RouteHandler.new
|
||||
subject = Kemal::ExceptionHandler.new(app)
|
||||
subject.next = app.route_handler
|
||||
subject.call(context)
|
||||
response.close
|
||||
io.rewind
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue