spec-kemal/spec/spec-kemal_spec.cr
Serdar Dogruyol 8c0d4268b9 0.2.0
2016-04-18 16:51:50 +03:00

16 lines
403 B
Crystal

require "./spec_helper"
describe "SpecKemalApp" do
start
it "handles get" do
get "/"
response.body.should eq "Hello world"
end
it "handles post" do
json_body = {"name": "Serdar", "age": 27, "skills": ["crystal, kemal"]}
post("/user", headers: HTTP::Headers{"Content-Type": "application/json"}, body: json_body.to_json)
response.body.should eq(json_body.to_json)
end
end