diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 076069d66..067ddfce9 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -216,20 +216,6 @@ Style/EmptyCaseCondition: Exclude: - 'app/models/concerns/verification.rb' -# Offense count: 9 -# Cop supports --auto-correct. -Layout/EmptyLines: - Exclude: - - 'app/models/concerns/search_cache.rb' - - 'app/models/notification.rb' - - 'spec/features/admin/spending_proposals_spec.rb' - - 'spec/features/admin/verifications_spec.rb' - - 'spec/features/debates_spec.rb' - - 'spec/features/registration_form_spec.rb' - - 'spec/features/users_auth_spec.rb' - - 'spec/features/verification/verified_user_spec.rb' - - 'spec/support/verifiable.rb' - # Offense count: 29 # Cop supports --auto-correct. # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment. diff --git a/app/models/concerns/search_cache.rb b/app/models/concerns/search_cache.rb index cf4d04f16..9b9e62024 100644 --- a/app/models/concerns/search_cache.rb +++ b/app/models/concerns/search_cache.rb @@ -31,5 +31,4 @@ module SearchCache ActionController::Base.helpers.sanitize(value, tags: []) end - end diff --git a/app/models/notification.rb b/app/models/notification.rb index bbbb18942..d08baecf2 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -7,7 +7,6 @@ class Notification < ActiveRecord::Base scope :not_emailed, -> { where(emailed_at: nil) } scope :for_render, -> { includes(:notifiable) } - def timestamp notifiable.created_at end diff --git a/spec/features/admin/feature_flags_spec.rb b/spec/features/admin/feature_flags_spec.rb index 956d80e6c..99c460477 100644 --- a/spec/features/admin/feature_flags_spec.rb +++ b/spec/features/admin/feature_flags_spec.rb @@ -13,7 +13,6 @@ feature 'Admin feature flags' do Setting['feature.spending_proposal_features.voting_allowed'] = nil end - scenario 'Enabled features are listed on menu' do visit admin_root_path diff --git a/spec/features/admin/spending_proposals_spec.rb b/spec/features/admin/spending_proposals_spec.rb index 91eb6716b..c27e102ee 100644 --- a/spec/features/admin/spending_proposals_spec.rb +++ b/spec/features/admin/spending_proposals_spec.rb @@ -634,7 +634,6 @@ feature 'Admin spending proposals' do proposal5 = create(:spending_proposal, geozone: new_york, valuation_finished: true) proposal6 = create(:spending_proposal, geozone: new_york, valuation_finished: false) - create(:vote, votable: proposal1) create(:vote, votable: proposal2) create(:vote, votable: proposal3) diff --git a/spec/features/admin/verifications_spec.rb b/spec/features/admin/verifications_spec.rb index 50ff457a1..ce455fe87 100644 --- a/spec/features/admin/verifications_spec.rb +++ b/spec/features/admin/verifications_spec.rb @@ -36,7 +36,6 @@ feature 'Incomplete verifications' do expect(page).to_not have_content("Isabel_anonymous") end - scenario "Residence unverified" do incompletely_verified_user = create(:user, :incomplete_verification) diff --git a/spec/features/debates_spec.rb b/spec/features/debates_spec.rb index 4d48508f2..3c90171e9 100644 --- a/spec/features/debates_spec.rb +++ b/spec/features/debates_spec.rb @@ -211,8 +211,6 @@ feature 'Debates' do expect(page.html).to_not include "" end - - scenario 'Update should not be posible if logged user is not the author' do debate = create(:debate) expect(debate).to be_editable @@ -947,7 +945,6 @@ feature 'Debates' do end end - scenario 'Index do not show featured debates if none is marked as featured' do admin = create(:administrator) login_as(admin.user) diff --git a/spec/features/registration_form_spec.rb b/spec/features/registration_form_spec.rb index 81b9d9bec..2d3d16a25 100644 --- a/spec/features/registration_form_spec.rb +++ b/spec/features/registration_form_spec.rb @@ -78,5 +78,4 @@ feature 'Registration form' do expect(current_path).to eq(new_user_registration_path) end - end diff --git a/spec/features/users_auth_spec.rb b/spec/features/users_auth_spec.rb index 617b1b1d4..566c1c233 100644 --- a/spec/features/users_auth_spec.rb +++ b/spec/features/users_auth_spec.rb @@ -200,7 +200,6 @@ feature 'Users' do expect(current_path).to eq(finish_signup_path) click_link 'Cancel login' - visit '/' expect_to_not_be_signed_in end diff --git a/spec/features/valuation/budget_investments_spec.rb b/spec/features/valuation/budget_investments_spec.rb index 7b1d48b8b..3f91d8925 100644 --- a/spec/features/valuation/budget_investments_spec.rb +++ b/spec/features/valuation/budget_investments_spec.rb @@ -76,7 +76,6 @@ feature 'Valuation budget investments' do expect(page).to have_link("Realocate visitors") expect(page).to have_link("Destroy the city") - expect(page).to have_content "All headings (2)" expect(page).to have_content "District 9 (1)" expect(page).to have_content "Down to the river (1)" diff --git a/spec/features/verification/verified_user_spec.rb b/spec/features/verification/verified_user_spec.rb index 451ea03e5..3b020fcb0 100644 --- a/spec/features/verification/verified_user_spec.rb +++ b/spec/features/verification/verified_user_spec.rb @@ -69,7 +69,6 @@ feature 'Verified users' do expect(current_path).to eq new_sms_path end - scenario "Select a verified email" do user = create(:user, residence_verified_at: Time.current, diff --git a/spec/models/budget/investment_spec.rb b/spec/models/budget/investment_spec.rb index 3b16bb033..827ca9d21 100644 --- a/spec/models/budget/investment_spec.rb +++ b/spec/models/budget/investment_spec.rb @@ -590,7 +590,6 @@ describe Budget::Investment do most_voted2 = create(:budget_investment, cached_votes_up: 10) least_voted2 = create(:budget_investment, cached_votes_up: 1) - expect(Budget::Investment.sort_by_confidence_score.first).to eq most_voted2 expect(Budget::Investment.sort_by_confidence_score.second).to eq most_voted expect(Budget::Investment.sort_by_confidence_score.third).to eq least_voted2 diff --git a/spec/support/verifiable.rb b/spec/support/verifiable.rb index 53c5931cc..9112c67cf 100644 --- a/spec/support/verifiable.rb +++ b/spec/support/verifiable.rb @@ -67,7 +67,6 @@ shared_examples_for "verifiable" do user3 = create(:user, verified_at: nil, confirmed_phone: nil) user4 = create(:user, verified_at: Time.current, residence_verified_at: Time.current, unconfirmed_phone: "123456789", confirmed_phone: "123456789") - expect(model.incomplete_verification).to include(user1) expect(model.incomplete_verification).to include(user2) expect(model.incomplete_verification).to_not include(user3)