Skip to content

Commit

Permalink
sample 'should be able to load a ticket and clean comment body' added…
Browse files Browse the repository at this point in the history
… to comments spec
  • Loading branch information
orodriguez authored and cored committed May 1, 2012
1 parent f0c9b54 commit 608fecd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/comment_spec.rb
Expand Up @@ -26,5 +26,9 @@
comment = @ticket.comment!(:body => 'new comment')
comment.should be_an_instance_of(@klass)
end


#see bug 116 tm-github: Bug Ticket#comments returning comments with weird text in the body
it "should be able to load a ticket and clean comment body" do
comments = @ticket.comments.map(&:body).should == ["for testing", "test comment"]
end
end
14 changes: 14 additions & 0 deletions spec/fixtures/comments.json
Expand Up @@ -12,5 +12,19 @@
"avatar_url": "https://secure.gravatar.com/avatar/42bd18419413dfbd6e7ec4fefdec94ae?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
"id": 1434902
}
},
{
"url": "https://api.github.com/repos/ticketmaster-user/tmtest-repo/issues/comments/3951282",
"created_at": "2012-02-13T22:49:55Z",
"body": "--- \nbody: test comment\n",
"updated_at": "2012-02-13T22:49:55Z",
"id": 3951283,
"user": {
"url": "https://api.github.com/users/ticketmaster-user",
"gravatar_id": "42bd18419413dfbd6e7ec4fefdec94ae",
"login": "ticketmaster-user",
"avatar_url": "https://secure.gravatar.com/avatar/42bd18419413dfbd6e7ec4fefdec94ae?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
"id": 1434902
}
}
]

0 comments on commit 608fecd

Please sign in to comment.