Skip to content

Commit

Permalink
Satiate Rubocop! [#3798]
Browse files Browse the repository at this point in the history
  • Loading branch information
awwaiid committed Aug 5, 2023
1 parent 79ddf74 commit 2f75591
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion app/controllers/reports/activity_graph_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ def received_distributed_data(range = selected_range)
"Distributed" => total_distributed_unformatted(range)
}
end

end
4 changes: 2 additions & 2 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ def default_title_content
end

def active_class(name)
name.any? { |path_name| controller_path.include? path_name } ? "active" : controller_path
(name.any? { |path_name| controller_path.include? path_name }) ? "active" : controller_path
end

def menu_open?(name)
name.any? { |path_name| controller_path.include? path_name } ? 'menu-open' : ''
(name.any? { |path_name| controller_path.include? path_name }) ? 'menu-open' : ''
end

def can_administrate?
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/donations_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ def total_received_donations_unformatted(range = selected_range)
def total_received_from_product_drives_unformatted(range = selected_range)
LineItem.active.where(itemizable: current_organization.donations.by_source(:product_drive).during(range)).sum(:quantity)
end
end
end
6 changes: 3 additions & 3 deletions spec/requests/reports/donations_summary_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require 'rails_helper'
require "rails_helper"

RSpec.describe "Reports::DonationsSummary", type: :request do
let(:default_params) do
{ organization_id: @organization.to_param }
{organization_id: @organization.to_param}
end

describe "while signed in" do
Expand All @@ -15,7 +15,7 @@
get reports_donations_summary_index_path(default_params.merge(format: response_format))
response
end
let(:response_format) { 'html' }
let(:response_format) { "html" }

it { is_expected.to have_http_status(:success) }
end
Expand Down
6 changes: 3 additions & 3 deletions spec/system/reports/donations_summary_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

context "when visiting the summary page" do
it "has a link to create a new donation" do
visit @url_prefix + "/reports/donations_summary"
visit @url_prefix + "/reports/donations_summary"
expect(page).to have_link "New Donation", href: "#{@url_prefix}/donations/new"
end

Expand Down Expand Up @@ -103,7 +103,7 @@ def create_next_donation(donation_date:)

describe("filtering to '#{filtered_date_range_label}'" + (set_custom_dates ? " (#{custom_dates})" : "")) do
before do
visit @url_prefix + "/reports/donations_summary"
visit @url_prefix + "/reports/donations_summary"
filter_to_date_range(filtered_date_range_label, custom_dates)
end

Expand Down Expand Up @@ -163,4 +163,4 @@ def valid_bracketing_dates(date_range_info)
[before_filtered_date_range, after_filtered_date_range]
end
end
end
end

0 comments on commit 2f75591

Please sign in to comment.