Remove unnecessary code
It looks like these variables were left by accident. The Ruby interpreter was giving us warnings about unused variables.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -388,8 +388,6 @@ describe "Stats" do
|
||||
end
|
||||
|
||||
scenario "Participants by poll" do
|
||||
oa = create(:poll_officer_assignment)
|
||||
|
||||
poll1 = create(:poll)
|
||||
poll2 = create(:poll)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user