Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused and obsolete code #3718

Merged
merged 9 commits into from
Sep 25, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unnecessary code
It looks like these variables were left by accident. The Ruby
interpreter was giving us warnings about unused variables.
  • Loading branch information
javierm committed Sep 24, 2019
commit cb2069858c9ddbf3cd3b5cde0c16a32e78fa941b
2 changes: 0 additions & 2 deletions app/models/abilities/tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ class Tracker
include CanCan::Ability

def initialize(user)
tracker = user.tracker

can :index, Budget
can [:index, :show, :edit], Budget::Investment
can :manage, Milestone
Expand Down
3 changes: 0 additions & 3 deletions spec/features/admin/poll/shifts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
end

scenario "Show" do
poll = create(:poll)
officer = create(:poll_officer)

booth1 = create(:poll_booth)
Expand Down Expand Up @@ -246,7 +245,6 @@
end

scenario "Destroy an officer" do
poll = create(:poll)
booth = create(:poll_booth)
officer = create(:poll_officer)

Expand All @@ -261,7 +259,6 @@
end

scenario "Empty" do
poll = create(:poll)
booth = create(:poll_booth)

visit new_admin_booth_shift_path(booth)
Expand Down
2 changes: 0 additions & 2 deletions spec/features/admin/stats_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,6 @@
end

scenario "Participants by poll" do
oa = create(:poll_officer_assignment)

poll1 = create(:poll)
poll2 = create(:poll)

Expand Down
1 change: 0 additions & 1 deletion spec/features/budgets/investments_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,6 @@ def investments_order
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
Expand Down
1 change: 0 additions & 1 deletion spec/features/direct_messages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
end

scenario "User not logged in" do
sender = create(:user)
receiver = create(:user)

visit new_user_direct_message_path(receiver)
Expand Down
7 changes: 3 additions & 4 deletions spec/features/polls/answers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@
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

Expand All @@ -55,7 +54,7 @@

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
Expand Down
2 changes: 0 additions & 2 deletions spec/features/polls/voter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
end

scenario "Voting in booth", :js do
user = create(:user, :in_census)

login_through_form_as_officer(officer.user)

visit new_officing_residence_path
Expand Down
1 change: 0 additions & 1 deletion spec/models/poll/shift_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@

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)
Expand Down
1 change: 0 additions & 1 deletion spec/models/signature_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@
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

Expand Down