Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. it "should not destroy notification for like on comment" do
  2. comment = FactoryGirl.create(:comment)
  3. like = FactoryGirl.create_list(:like, 2, likable: comment)
  4. like.first.destroy
  5. note = comment.user.notifications.find_by(notifiable: comment, from_comment: false)
  6. note.should_not be_nil
  7. end
  8.  
  9. $ rails c test
  10.  
  11. it "should not destroy notification for like on comment" do
  12. comment = FactoryGirl.create(:comment)
  13. like = FactoryGirl.create_list(:like, 2, likable: comment)
  14. debugger
  15. like.first.destroy
  16. note = comment.user.notifications.find_by(notifiable: comment, from_comment: false)
  17. note.should_not be_nil
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement