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

@@ -29,9 +29,9 @@ feature 'Admin hidden users' do
click_link 'Restore'
expect(page).to_not have_content(user.username)
expect(page).not_to have_content(user.username)
expect(user.reload).to_not be_hidden
expect(user.reload).not_to be_hidden
end
scenario 'Confirm hide' do
@@ -40,7 +40,7 @@ feature 'Admin hidden users' do
click_link 'Confirm'
expect(page).to_not have_content(user.username)
expect(page).not_to have_content(user.username)
click_link('Confirmed')
expect(page).to have_content(user.username)
@@ -49,24 +49,24 @@ feature 'Admin hidden users' do
scenario "Current filter is properly highlighted" do
visit admin_hidden_users_path
expect(page).to_not have_link('Pending')
expect(page).not_to have_link('Pending')
expect(page).to have_link('All')
expect(page).to have_link('Confirmed')
visit admin_hidden_users_path(filter: 'Pending')
expect(page).to_not have_link('Pending')
expect(page).not_to have_link('Pending')
expect(page).to have_link('All')
expect(page).to have_link('Confirmed')
visit admin_hidden_users_path(filter: 'all')
expect(page).to have_link('Pending')
expect(page).to_not have_link('All')
expect(page).not_to have_link('All')
expect(page).to have_link('Confirmed')
visit admin_hidden_users_path(filter: 'with_confirmed_hide')
expect(page).to have_link('All')
expect(page).to have_link('Pending')
expect(page).to_not have_link('Confirmed')
expect(page).not_to have_link('Confirmed')
end
scenario "Filtering users" do
@@ -78,7 +78,7 @@ feature 'Admin hidden users' do
expect(page).to have_content('Confirmed user')
visit admin_hidden_users_path(filter: 'with_confirmed_hide')
expect(page).to_not have_content('Unconfirmed')
expect(page).not_to have_content('Unconfirmed')
expect(page).to have_content('Confirmed user')
end