Merge pull request #32 from ilatif/master

Removed env from redirect and changed redirect from method to macro.
This commit is contained in:
Serdar Dogruyol 2015-12-09 22:27:04 +02:00
commit 12c6af7d79
4 changed files with 7 additions and 7 deletions

View file

@ -187,7 +187,7 @@ describe "Kemal::Handler" do
it "redirects user to provided url" do
kemal = Kemal::Handler.new
kemal.add_route "GET", "/" do |env|
env.redirect("/login")
redirect "/login"
end
request = HTTP::Request.new("GET", "/")
response = kemal.call(request)