diff --git a/app/models/abilities/tracker.rb b/app/models/abilities/tracker.rb index 37279c82d..a755d26fb 100644 --- a/app/models/abilities/tracker.rb +++ b/app/models/abilities/tracker.rb @@ -3,8 +3,6 @@ module Abilities include CanCan::Ability def initialize(user) - tracker = user.tracker - can :index, Budget can [:index, :show, :edit], Budget::Investment can :manage, Milestone diff --git a/spec/features/admin/poll/shifts_spec.rb b/spec/features/admin/poll/shifts_spec.rb index bbde7be25..2720bb32c 100644 --- a/spec/features/admin/poll/shifts_spec.rb +++ b/spec/features/admin/poll/shifts_spec.rb @@ -8,7 +8,6 @@ describe "Admin shifts" do end scenario "Show" do - poll = create(:poll) officer = create(:poll_officer) booth1 = create(:poll_booth) @@ -246,7 +245,6 @@ describe "Admin shifts" do end scenario "Destroy an officer" do - poll = create(:poll) booth = create(:poll_booth) officer = create(:poll_officer) @@ -261,7 +259,6 @@ describe "Admin shifts" do end scenario "Empty" do - poll = create(:poll) booth = create(:poll_booth) visit new_admin_booth_shift_path(booth) diff --git a/spec/features/admin/stats_spec.rb b/spec/features/admin/stats_spec.rb index 7abf9db3c..1f1c8275f 100644 --- a/spec/features/admin/stats_spec.rb +++ b/spec/features/admin/stats_spec.rb @@ -388,8 +388,6 @@ describe "Stats" do end scenario "Participants by poll" do - oa = create(:poll_officer_assignment) - poll1 = create(:poll) poll2 = create(:poll) diff --git a/spec/features/budgets/investments_spec.rb b/spec/features/budgets/investments_spec.rb index 97e31f2fa..58525cc80 100644 --- a/spec/features/budgets/investments_spec.rb +++ b/spec/features/budgets/investments_spec.rb @@ -1760,7 +1760,6 @@ describe "Budget Investments" do scenario "Due to being unfeasible" do user = create(:user, :level_two) investment = create(:budget_investment, :selected, heading: heading) - heading2 = create(:budget_heading, group: group) ballot = create(:budget_ballot, user: user, budget: budget) ballot.investments << investment diff --git a/spec/features/direct_messages_spec.rb b/spec/features/direct_messages_spec.rb index 2872d252b..dbf7d0ebf 100644 --- a/spec/features/direct_messages_spec.rb +++ b/spec/features/direct_messages_spec.rb @@ -60,7 +60,6 @@ describe "Direct messages" do end scenario "User not logged in" do - sender = create(:user) receiver = create(:user) visit new_user_direct_message_path(receiver) diff --git a/spec/features/polls/answers_spec.rb b/spec/features/polls/answers_spec.rb index 67d46fb16..35043ec4d 100644 --- a/spec/features/polls/answers_spec.rb +++ b/spec/features/polls/answers_spec.rb @@ -39,12 +39,11 @@ describe "Answers" do end scenario "Add video to answer" do - answer1 = create(:poll_question_answer, question: question) - answer2 = create(:poll_question_answer, question: question) + answer = create(:poll_question_answer, question: question) visit admin_question_path(question) - within("#poll_question_answer_#{answer1.id}") do + within("#poll_question_answer_#{answer.id}") do click_link "Video list" end @@ -55,7 +54,7 @@ describe "Answers" do click_button "Save" - within("#poll_question_answer_video_#{answer1.videos.last.id}") do + within("#poll_question_answer_video_#{answer.videos.last.id}") do expect(page).to have_content "Awesome project video" expect(page).to have_content "https://www.youtube.com/watch?v=123" end diff --git a/spec/features/polls/voter_spec.rb b/spec/features/polls/voter_spec.rb index 77e14e17d..391cb6489 100644 --- a/spec/features/polls/voter_spec.rb +++ b/spec/features/polls/voter_spec.rb @@ -50,8 +50,6 @@ describe "Voter" do end scenario "Voting in booth", :js do - user = create(:user, :in_census) - login_through_form_as_officer(officer.user) visit new_officing_residence_path diff --git a/spec/models/poll/shift_spec.rb b/spec/models/poll/shift_spec.rb index 7edebfeca..5baaede91 100644 --- a/spec/models/poll/shift_spec.rb +++ b/spec/models/poll/shift_spec.rb @@ -58,7 +58,6 @@ describe Poll::Shift do it "creates and destroy corresponding officer_assignments" do poll2 = create(:poll) - poll3 = create(:poll) booth_assignment1 = create(:poll_booth_assignment, poll: poll, booth: booth) booth_assignment2 = create(:poll_booth_assignment, poll: poll2, booth: booth) diff --git a/spec/models/signature_spec.rb b/spec/models/signature_spec.rb index 3a3bebcd7..f194f3d22 100644 --- a/spec/models/signature_spec.rb +++ b/spec/models/signature_spec.rb @@ -183,7 +183,6 @@ describe Signature do it "creates a user with that document number" do create(:geozone, census_code: "01") signature = create(:signature, document_number: "12345678Z") - proposal = signature.signable signature.verify