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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user