Unify show comments specs
This commit is contained in:
@@ -6,16 +6,6 @@ describe "Commenting debates" do
|
||||
|
||||
it_behaves_like "flaggable", :debate_comment
|
||||
|
||||
scenario "Show comment when the author is hidden" do
|
||||
create(:comment, body: "This is pointless", commentable: debate, author: create(:user, :hidden))
|
||||
|
||||
visit debate_path(debate)
|
||||
|
||||
within ".comment", text: "This is pointless" do
|
||||
expect(page).to have_content "User deleted"
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Submit button is disabled after clicking" do
|
||||
debate = create(:debate)
|
||||
login_as(user)
|
||||
|
||||
@@ -497,6 +497,16 @@ describe "Comments" do
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Show comment when the author is hidden" do
|
||||
create(:comment, body: "This is pointless", commentable: resource, author: create(:user, :hidden))
|
||||
|
||||
visit polymorphic_path(resource)
|
||||
|
||||
within ".comment", text: "This is pointless" do
|
||||
expect(page).to have_content "User deleted"
|
||||
end
|
||||
end
|
||||
|
||||
describe "Moderators" do
|
||||
let(:moderator) { create(:moderator) }
|
||||
before { login_as(moderator.user) }
|
||||
|
||||
Reference in New Issue
Block a user