shard-kemal/spec/frank_handler_spec.cr

14 lines
282 B
Crystal
Raw Normal View History

require "spec_helper"
describe "Frank::Handler" do
it "routes" do
frank = Frank::Handler.new
frank.add_route "GET", "/" do
"hello"
end
request = HTTP::Request.new("GET", "/")
response = frank.call(request)
response.body.should eq("hello")
end
end