diff --git a/app/views/comments/_comment.html.haml b/app/views/comments/_comment.html.haml index b92be2366..f1a11bf7d 100644 --- a/app/views/comments/_comment.html.haml +++ b/app/views/comments/_comment.html.haml @@ -5,7 +5,7 @@ %li.comment.posted{:id => comment.guid, :class => ("hidden" if(defined? hidden))} - if current_user && (current_user.owns?(comment) || current_user.owns?(post)) .right.controls - = link_to image_tag('deletelabel.png'), post_comment_path(comment.post_id, comment), :class => "delete comment_delete", :title => t('delete') + = link_to image_tag('deletelabel.png'), post_comment_path(comment.post_id, comment), :class => "delete comment_delete", :title => t('delete'), :confirm => t('are_you_sure') = person_image_link(comment.author, :size => :thumb_small) .content %span.from diff --git a/features/comments.feature b/features/comments.feature index cdd14668a..5d542124b 100644 --- a/features/comments.feature +++ b/features/comments.feature @@ -47,6 +47,7 @@ Feature: commenting And I press "Comment" And I wait for the ajax to finish When I hover over the ".comment.posted" + And I preemptively confirm the alert And I click to delete the first comment And I wait for the ajax to finish And I wait for 2 seconds