Uses the new field, erased_at, for erased users

This commit is contained in:
kikito
2015-10-21 14:28:21 +02:00
parent 3d4e82f94f
commit 6c5d1faa90
14 changed files with 123 additions and 10 deletions

View File

@@ -193,6 +193,18 @@ feature 'Commenting debates' do
end
end
scenario "Erasing a comment's author" do
debate = create(:debate)
comment = create(:comment, commentable: debate, body: 'this should be visible')
comment.user.erase
visit debate_path(debate)
within "#comment_#{comment.id}" do
expect(page).to have_content('Deleted user')
expect(page).to have_content('this should be visible')
end
end
feature "Moderators" do
scenario "can create comment as a moderator", :js do
moderator = create(:moderator)