Enable RSpec/NotToNot cop and fix all issues

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
This commit is contained in:
Bertocq
2018-01-07 17:39:48 +01:00
parent 79a3b97c64
commit 34bb9d65b1
143 changed files with 1041 additions and 1038 deletions

View File

@@ -51,7 +51,7 @@ feature 'Commenting Budget::Investments' do
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 2)
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content grandchild_comment.body
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
@@ -61,8 +61,8 @@ feature 'Commenting Budget::Investments' do
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 1)
expect(page).to_not have_content child_comment.body
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content child_comment.body
expect(page).not_to have_content grandchild_comment.body
end
scenario 'Comment order' do
@@ -147,7 +147,7 @@ feature 'Commenting Budget::Investments' do
within("ul.pagination") do
expect(page).to have_content("1")
expect(page).to have_content("2")
expect(page).to_not have_content("3")
expect(page).not_to have_content("3")
click_link "Next", exact: false
end
@@ -161,8 +161,8 @@ feature 'Commenting Budget::Investments' do
expect(page).to have_content 'You must Sign in or Sign up to leave a comment'
within('#comments') do
expect(page).to_not have_content 'Write a comment'
expect(page).to_not have_content 'Reply'
expect(page).not_to have_content 'Write a comment'
expect(page).not_to have_content 'Reply'
end
end
end
@@ -211,7 +211,7 @@ feature 'Commenting Budget::Investments' do
expect(page).to have_content 'It will be done next week.'
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario 'Errors on reply', :js do
@@ -271,7 +271,7 @@ feature 'Commenting Budget::Investments' do
expect(page).to have_css("#flag-expand-comment-#{comment.id}")
end
expect(Flag.flagged?(user, comment)).to_not be
expect(Flag.flagged?(user, comment)).not_to be
end
scenario "Flagging turbolinks sanity check", :js do
@@ -343,7 +343,7 @@ feature 'Commenting Budget::Investments' do
expect(page).to have_css "img.moderator-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as an administrator" do
@@ -352,7 +352,7 @@ feature 'Commenting Budget::Investments' do
login_as(moderator.user)
visit budget_investment_path(investment.budget, investment)
expect(page).to_not have_content "Comment as administrator"
expect(page).not_to have_content "Comment as administrator"
end
end
@@ -399,7 +399,7 @@ feature 'Commenting Budget::Investments' do
expect(page).to have_css "img.admin-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as a moderator" do
@@ -408,7 +408,7 @@ feature 'Commenting Budget::Investments' do
login_as(admin.user)
visit budget_investment_path(investment.budget, investment)
expect(page).to_not have_content "Comment as moderator"
expect(page).not_to have_content "Comment as moderator"
end
end

View File

@@ -51,7 +51,7 @@ feature 'Commenting debates' do
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 2)
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content grandchild_comment.body
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
@@ -61,8 +61,8 @@ feature 'Commenting debates' do
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 1)
expect(page).to_not have_content child_comment.body
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content child_comment.body
expect(page).not_to have_content grandchild_comment.body
end
scenario 'Comment order' do
@@ -147,7 +147,7 @@ feature 'Commenting debates' do
within("ul.pagination") do
expect(page).to have_content("1")
expect(page).to have_content("2")
expect(page).to_not have_content("3")
expect(page).not_to have_content("3")
click_link "Next", exact: false
end
@@ -161,8 +161,8 @@ feature 'Commenting debates' do
expect(page).to have_content 'You must Sign in or Sign up to leave a comment'
within('#comments') do
expect(page).to_not have_content 'Write a comment'
expect(page).to_not have_content 'Reply'
expect(page).not_to have_content 'Write a comment'
expect(page).not_to have_content 'Reply'
end
end
end
@@ -208,7 +208,7 @@ feature 'Commenting debates' do
expect(page).to have_content 'It will be done next week.'
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario 'Errors on reply', :js do
@@ -268,7 +268,7 @@ feature 'Commenting debates' do
expect(page).to have_css("#flag-expand-comment-#{comment.id}")
end
expect(Flag.flagged?(user, comment)).to_not be
expect(Flag.flagged?(user, comment)).not_to be
end
scenario "Flagging turbolinks sanity check", :js do
@@ -307,7 +307,7 @@ feature 'Commenting debates' do
# The button's text should now be "..."
# This should be checked before the Ajax request is finished
expect(page).to_not have_button 'Publish comment'
expect(page).not_to have_button 'Publish comment'
expect(page).to have_content('Testing submit button!')
end
@@ -355,7 +355,7 @@ feature 'Commenting debates' do
expect(page).to have_css "img.moderator-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as an administrator" do
@@ -364,7 +364,7 @@ feature 'Commenting debates' do
login_as(moderator.user)
visit debate_path(debate)
expect(page).to_not have_content "Comment as administrator"
expect(page).not_to have_content "Comment as administrator"
end
end
@@ -411,7 +411,7 @@ feature 'Commenting debates' do
expect(page).to have_css "img.admin-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as a moderator" do
@@ -420,7 +420,7 @@ feature 'Commenting debates' do
login_as(admin.user)
visit debate_path(debate)
expect(page).to_not have_content "Comment as moderator"
expect(page).not_to have_content "Comment as moderator"
end
end
@@ -501,7 +501,7 @@ feature 'Commenting debates' do
find('.in_favor a').click
within('.in_favor') do
expect(page).to_not have_content "2"
expect(page).not_to have_content "2"
expect(page).to have_content "1"
end

View File

@@ -58,7 +58,7 @@ feature 'Commenting legislation questions' do
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 2)
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content grandchild_comment.body
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
@@ -68,8 +68,8 @@ feature 'Commenting legislation questions' do
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 1)
expect(page).to_not have_content child_comment.body
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content child_comment.body
expect(page).not_to have_content grandchild_comment.body
end
scenario 'Comment order' do
@@ -178,7 +178,7 @@ feature 'Commenting legislation questions' do
within("ul.pagination") do
expect(page).to have_content("1")
expect(page).to have_content("2")
expect(page).to_not have_content("3")
expect(page).not_to have_content("3")
click_link "Next", exact: false
end
@@ -194,8 +194,8 @@ feature 'Commenting legislation questions' do
expect(page).to have_content 'You must Sign in or Sign up to leave a comment'
within('#comments') do
expect(page).to_not have_content 'Write a comment'
expect(page).to_not have_content 'Reply'
expect(page).not_to have_content 'Write a comment'
expect(page).not_to have_content 'Reply'
end
end
end
@@ -248,7 +248,7 @@ feature 'Commenting legislation questions' do
expect(page).to have_content 'It will be done next week.'
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario 'Errors on reply', :js do
@@ -317,7 +317,7 @@ feature 'Commenting legislation questions' do
expect(page).to have_css("#flag-expand-comment-#{comment.id}")
end
expect(Flag.flagged?(user, comment)).to_not be
expect(Flag.flagged?(user, comment)).not_to be
end
scenario "Flagging turbolinks sanity check", :js do
@@ -363,7 +363,7 @@ feature 'Commenting legislation questions' do
# The button's text should now be "..."
# This should be checked before the Ajax request is finished
expect(page).to_not have_button 'Publish comment'
expect(page).not_to have_button 'Publish comment'
expect(page).to have_content('Testing submit button!')
end
@@ -416,7 +416,7 @@ feature 'Commenting legislation questions' do
expect(page).to have_css "img.moderator-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as an administrator" do
@@ -427,7 +427,7 @@ feature 'Commenting legislation questions' do
legislation_annotation.draft_version,
legislation_annotation)
expect(page).to_not have_content "Comment as administrator"
expect(page).not_to have_content "Comment as administrator"
end
end
@@ -479,7 +479,7 @@ feature 'Commenting legislation questions' do
expect(page).to have_css "img.admin-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as a moderator" do
@@ -490,7 +490,7 @@ feature 'Commenting legislation questions' do
legislation_annotation.draft_version,
legislation_annotation)
expect(page).to_not have_content "Comment as moderator"
expect(page).not_to have_content "Comment as moderator"
end
end
@@ -579,7 +579,7 @@ feature 'Commenting legislation questions' do
find('.in_favor a').click
within('.in_favor') do
expect(page).to_not have_content "2"
expect(page).not_to have_content "2"
expect(page).to have_content "1"
end

View File

@@ -58,7 +58,7 @@ feature 'Commenting legislation questions' do
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 2)
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content grandchild_comment.body
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
@@ -68,8 +68,8 @@ feature 'Commenting legislation questions' do
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 1)
expect(page).to_not have_content child_comment.body
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content child_comment.body
expect(page).not_to have_content grandchild_comment.body
end
scenario 'Comment order' do
@@ -154,7 +154,7 @@ feature 'Commenting legislation questions' do
within("ul.pagination") do
expect(page).to have_content("1")
expect(page).to have_content("2")
expect(page).to_not have_content("3")
expect(page).not_to have_content("3")
click_link "Next", exact: false
end
@@ -168,8 +168,8 @@ feature 'Commenting legislation questions' do
expect(page).to have_content 'You must Sign in or Sign up to leave a comment'
within('#comments') do
expect(page).to_not have_content 'Write a comment'
expect(page).to_not have_content 'Reply'
expect(page).not_to have_content 'Write a comment'
expect(page).not_to have_content 'Reply'
end
end
end
@@ -233,7 +233,7 @@ feature 'Commenting legislation questions' do
expect(page).to have_content 'It will be done next week.'
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario 'Errors on reply', :js do
@@ -293,7 +293,7 @@ feature 'Commenting legislation questions' do
expect(page).to have_css("#flag-expand-comment-#{comment.id}")
end
expect(Flag.flagged?(user, comment)).to_not be
expect(Flag.flagged?(user, comment)).not_to be
end
scenario "Flagging turbolinks sanity check", :js do
@@ -330,7 +330,7 @@ feature 'Commenting legislation questions' do
# The button's text should now be "..."
# This should be checked before the Ajax request is finished
expect(page).to_not have_button 'Publish answer'
expect(page).not_to have_button 'Publish answer'
expect(page).to have_content('Testing submit button!')
end
@@ -378,7 +378,7 @@ feature 'Commenting legislation questions' do
expect(page).to have_css "img.moderator-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as an administrator" do
@@ -387,7 +387,7 @@ feature 'Commenting legislation questions' do
login_as(moderator.user)
visit legislation_process_question_path(legislation_question.process, legislation_question)
expect(page).to_not have_content "Comment as administrator"
expect(page).not_to have_content "Comment as administrator"
end
end
@@ -434,7 +434,7 @@ feature 'Commenting legislation questions' do
expect(page).to have_css "img.admin-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as a moderator" do
@@ -443,7 +443,7 @@ feature 'Commenting legislation questions' do
login_as(admin.user)
visit legislation_process_question_path(legislation_question.process, legislation_question)
expect(page).to_not have_content "Comment as moderator"
expect(page).not_to have_content "Comment as moderator"
end
end
@@ -524,7 +524,7 @@ feature 'Commenting legislation questions' do
find('.in_favor a').click
within('.in_favor') do
expect(page).to_not have_content "2"
expect(page).not_to have_content "2"
expect(page).to have_content "1"
end

View File

@@ -52,7 +52,7 @@ feature 'Commenting polls' do
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 2)
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content grandchild_comment.body
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
@@ -62,8 +62,8 @@ feature 'Commenting polls' do
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 1)
expect(page).to_not have_content child_comment.body
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content child_comment.body
expect(page).not_to have_content grandchild_comment.body
end
scenario 'Comment order' do
@@ -148,7 +148,7 @@ feature 'Commenting polls' do
within("ul.pagination") do
expect(page).to have_content("1")
expect(page).to have_content("2")
expect(page).to_not have_content("3")
expect(page).not_to have_content("3")
click_link "Next", exact: false
end
@@ -162,8 +162,8 @@ feature 'Commenting polls' do
expect(page).to have_content 'You must Sign in or Sign up to leave a comment'
within('#comments') do
expect(page).to_not have_content 'Write a comment'
expect(page).to_not have_content 'Reply'
expect(page).not_to have_content 'Write a comment'
expect(page).not_to have_content 'Reply'
end
end
end
@@ -212,7 +212,7 @@ feature 'Commenting polls' do
expect(page).to have_content 'It will be done next week.'
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario 'Errors on reply', :js do
@@ -276,7 +276,7 @@ feature 'Commenting polls' do
expect(page).to have_css("#flag-expand-comment-#{comment.id}")
end
expect(Flag.flagged?(user, comment)).to_not be
expect(Flag.flagged?(user, comment)).not_to be
end
scenario "Flagging turbolinks sanity check", :js do
@@ -355,7 +355,7 @@ feature 'Commenting polls' do
expect(page).to have_css "img.moderator-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as an administrator" do
@@ -366,7 +366,7 @@ feature 'Commenting polls' do
login_as(moderator.user)
visit poll_path(poll)
expect(page).to_not have_content "Comment as administrator"
expect(page).not_to have_content "Comment as administrator"
end
end
@@ -417,7 +417,7 @@ feature 'Commenting polls' do
expect(page).to have_css "img.admin-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as a moderator" do
@@ -428,7 +428,7 @@ feature 'Commenting polls' do
login_as(admin.user)
visit poll_path(poll)
expect(page).to_not have_content "Comment as moderator"
expect(page).not_to have_content "Comment as moderator"
end
end

View File

@@ -50,7 +50,7 @@ feature 'Commenting proposals' do
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 2)
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content grandchild_comment.body
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
@@ -60,8 +60,8 @@ feature 'Commenting proposals' do
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 1)
expect(page).to_not have_content child_comment.body
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content child_comment.body
expect(page).not_to have_content grandchild_comment.body
end
scenario 'Comment order' do
@@ -146,7 +146,7 @@ feature 'Commenting proposals' do
within("ul.pagination") do
expect(page).to have_content("1")
expect(page).to have_content("2")
expect(page).to_not have_content("3")
expect(page).not_to have_content("3")
click_link "Next", exact: false
end
@@ -160,8 +160,8 @@ feature 'Commenting proposals' do
expect(page).to have_content 'You must Sign in or Sign up to leave a comment'
within('#comments') do
expect(page).to_not have_content 'Write a comment'
expect(page).to_not have_content 'Reply'
expect(page).not_to have_content 'Write a comment'
expect(page).not_to have_content 'Reply'
end
end
end
@@ -210,7 +210,7 @@ feature 'Commenting proposals' do
expect(page).to have_content 'It will be done next week.'
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario 'Errors on reply', :js do
@@ -270,7 +270,7 @@ feature 'Commenting proposals' do
expect(page).to have_css("#flag-expand-comment-#{comment.id}")
end
expect(Flag.flagged?(user, comment)).to_not be
expect(Flag.flagged?(user, comment)).not_to be
end
scenario "Flagging turbolinks sanity check", :js do
@@ -342,7 +342,7 @@ feature 'Commenting proposals' do
expect(page).to have_css "img.moderator-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as an administrator" do
@@ -351,7 +351,7 @@ feature 'Commenting proposals' do
login_as(moderator.user)
visit proposal_path(proposal)
expect(page).to_not have_content "Comment as administrator"
expect(page).not_to have_content "Comment as administrator"
end
end
@@ -398,7 +398,7 @@ feature 'Commenting proposals' do
expect(page).to have_css "img.admin-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as a moderator" do
@@ -407,7 +407,7 @@ feature 'Commenting proposals' do
login_as(admin.user)
visit proposal_path(proposal)
expect(page).to_not have_content "Comment as moderator"
expect(page).not_to have_content "Comment as moderator"
end
end

View File

@@ -54,7 +54,7 @@ feature 'Commenting topics from proposals' do
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 2)
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content grandchild_comment.body
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
@@ -64,8 +64,8 @@ feature 'Commenting topics from proposals' do
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 1)
expect(page).to_not have_content child_comment.body
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content child_comment.body
expect(page).not_to have_content grandchild_comment.body
end
scenario 'Comment order' do
@@ -160,7 +160,7 @@ feature 'Commenting topics from proposals' do
within("ul.pagination") do
expect(page).to have_content("1")
expect(page).to have_content("2")
expect(page).to_not have_content("3")
expect(page).not_to have_content("3")
click_link "Next", exact: false
end
@@ -177,8 +177,8 @@ feature 'Commenting topics from proposals' do
expect(page).to have_content 'You must Sign in or Sign up to leave a comment'
within('#comments') do
expect(page).to_not have_content 'Write a comment'
expect(page).to_not have_content 'Reply'
expect(page).not_to have_content 'Write a comment'
expect(page).not_to have_content 'Reply'
end
end
end
@@ -233,7 +233,7 @@ feature 'Commenting topics from proposals' do
expect(page).to have_content 'It will be done next week.'
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario 'Errors on reply', :js do
@@ -301,7 +301,7 @@ feature 'Commenting topics from proposals' do
expect(page).to have_css("#flag-expand-comment-#{comment.id}")
end
expect(Flag.flagged?(user, comment)).to_not be
expect(Flag.flagged?(user, comment)).not_to be
end
scenario "Flagging turbolinks sanity check", :js do
@@ -384,7 +384,7 @@ feature 'Commenting topics from proposals' do
expect(page).to have_css "img.moderator-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as an administrator" do
@@ -395,7 +395,7 @@ feature 'Commenting topics from proposals' do
login_as(moderator.user)
visit community_topic_path(community, topic)
expect(page).to_not have_content "Comment as administrator"
expect(page).not_to have_content "Comment as administrator"
end
end
@@ -446,7 +446,7 @@ feature 'Commenting topics from proposals' do
expect(page).to have_css "img.admin-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as a moderator" do
@@ -457,7 +457,7 @@ feature 'Commenting topics from proposals' do
login_as(admin.user)
visit community_topic_path(community, topic)
expect(page).to_not have_content "Comment as moderator"
expect(page).not_to have_content "Comment as moderator"
end
end
@@ -604,7 +604,7 @@ feature 'Commenting topics from budget investments' do
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 2)
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content grandchild_comment.body
find("#comment_#{child_comment.id}_children_arrow").trigger('click')
@@ -614,8 +614,8 @@ feature 'Commenting topics from budget investments' do
find("#comment_#{parent_comment.id}_children_arrow").trigger('click')
expect(page).to have_css('.comment', count: 1)
expect(page).to_not have_content child_comment.body
expect(page).to_not have_content grandchild_comment.body
expect(page).not_to have_content child_comment.body
expect(page).not_to have_content grandchild_comment.body
end
scenario 'Comment order' do
@@ -710,7 +710,7 @@ feature 'Commenting topics from budget investments' do
within("ul.pagination") do
expect(page).to have_content("1")
expect(page).to have_content("2")
expect(page).to_not have_content("3")
expect(page).not_to have_content("3")
click_link "Next", exact: false
end
@@ -727,8 +727,8 @@ feature 'Commenting topics from budget investments' do
expect(page).to have_content 'You must Sign in or Sign up to leave a comment'
within('#comments') do
expect(page).to_not have_content 'Write a comment'
expect(page).to_not have_content 'Reply'
expect(page).not_to have_content 'Write a comment'
expect(page).not_to have_content 'Reply'
end
end
end
@@ -783,7 +783,7 @@ feature 'Commenting topics from budget investments' do
expect(page).to have_content 'It will be done next week.'
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario 'Errors on reply', :js do
@@ -851,7 +851,7 @@ feature 'Commenting topics from budget investments' do
expect(page).to have_css("#flag-expand-comment-#{comment.id}")
end
expect(Flag.flagged?(user, comment)).to_not be
expect(Flag.flagged?(user, comment)).not_to be
end
scenario "Flagging turbolinks sanity check", :js do
@@ -934,7 +934,7 @@ feature 'Commenting topics from budget investments' do
expect(page).to have_css "img.moderator-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as an administrator" do
@@ -945,7 +945,7 @@ feature 'Commenting topics from budget investments' do
login_as(moderator.user)
visit community_topic_path(community, topic)
expect(page).to_not have_content "Comment as administrator"
expect(page).not_to have_content "Comment as administrator"
end
end
@@ -996,7 +996,7 @@ feature 'Commenting topics from budget investments' do
expect(page).to have_css "img.admin-avatar"
end
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
expect(page).not_to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
end
scenario "can not comment as a moderator" do
@@ -1007,7 +1007,7 @@ feature 'Commenting topics from budget investments' do
login_as(admin.user)
visit community_topic_path(community, topic)
expect(page).to_not have_content "Comment as moderator"
expect(page).not_to have_content "Comment as moderator"
end
end