sub_comment<<(comment[0].children.create:body=>"comment body",:title=>"comment title 0",:user_id=>1,:course_id=>1,:comment_thread_id=>comment_thread.id)
sub_comment<<(comment[0].children.create:body=>"comment body",:title=>"comment title 1",:user_id=>1,:course_id=>1,:comment_thread_id=>comment_thread.id)
get"/api/v1/comments/#{comment[0].id}"
last_response.shouldbe_ok
c=Yajl::Parser.parselast_response.body
c["title"].should=="top 0"
c["body"].should=="top comment"
c["user_id"].should==1
c["course_id"].should==1
c["comment_thread_id"].should==comment_thread.id
c["created_at"].should_notbe_nil
c["updated_at"].should_notbe_nil
c["votes"]["up"].should==0
c["votes"]["down"].should==0
c["children"].shouldbe_nil
end
end
describe"DELETE on /api/v1/commentables/:commentable_type/:commentable_id"do
describe"DELETE on /api/v1/commentables/:commentable_type/:commentable_id"do