This commit is contained in:
Serdar Dogruyol 2016-04-18 16:51:50 +03:00
parent 4abdf39037
commit 8c0d4268b9
5 changed files with 13 additions and 7 deletions

View file

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