Commit 43e3c350 by Rocky Duan

add test for invalid object id

parent bb4494bc
...@@ -31,7 +31,10 @@ describe "app" do ...@@ -31,7 +31,10 @@ describe "app" do
it "returns 400 when the thread does not exist" do it "returns 400 when the thread does not exist" do
get "/api/v1/threads/does_not_exist" get "/api/v1/threads/does_not_exist"
last_response.status.should == 400 last_response.status.should == 400
get "/api/v1/threads/5016a3caec5eb9a12300000b1"
last_response.status.should == 400
end end
it "get information of a single comment thread with its tags" do it "get information of a single comment thread with its tags" do
thread = CommentThread.new thread = CommentThread.new
thread.title = "new thread" thread.title = "new thread"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment