mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-03 22:06:07 +00:00
Fix rubocop isssues, trailing whitespaces and empty lines
This commit is contained in:
@@ -6,25 +6,6 @@
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 3
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: final_newline, final_blank_line
|
||||
Layout/TrailingEmptyLines:
|
||||
Exclude:
|
||||
- 'spec/factories.rb'
|
||||
- 'spec/factories/address_factory.rb'
|
||||
- 'spec/support/request/stripe_helper.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AllowInHeredoc.
|
||||
Layout/TrailingWhitespace:
|
||||
Exclude:
|
||||
- 'spec/features/consumer/shopping/shopping_spec.rb'
|
||||
- 'spec/lib/open_food_network/orders_and_fulfillments_report/customer_totals_report_spec.rb'
|
||||
- 'spec/requests/api/orders_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
Lint/DuplicateMethods:
|
||||
Exclude:
|
||||
|
||||
@@ -124,4 +124,4 @@ FactoryBot.define do
|
||||
stripe_user_id "abc123"
|
||||
stripe_publishable_key "xyz456"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -27,4 +27,4 @@ FactoryBot.define do
|
||||
phone { Faker::PhoneNumber.phone_number }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -83,7 +83,7 @@ RSpec.describe OpenFoodNetwork::OrdersAndFulfillmentsReport::CustomerTotalsRepor
|
||||
|
||||
context "displaying payment fees" do
|
||||
context "with both failed and completed payments present" do
|
||||
let!(:order) {
|
||||
let!(:order) {
|
||||
create(:order_ready_to_ship, user: customer.user,
|
||||
customer: customer, distributor: distributor)
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@ describe 'api/orders', type: :request do
|
||||
response(200, 'get orders') do
|
||||
# Adds model metadata for Swagger UI. Ideally we'd be able to just add:
|
||||
# schema '$ref' => '#/components/schemas/Order_Concise'
|
||||
# Which would also validate the response in the test, this is an open
|
||||
# Which would also validate the response in the test, this is an open
|
||||
# issue with rswag: https://github.com/rswag/rswag/issues/268
|
||||
metadata[:response][:content] = {
|
||||
metadata[:response][:content] = {
|
||||
"application/json": {
|
||||
schema: { '$ref' => '#/components/schemas/Order_Concise' }
|
||||
}
|
||||
@@ -64,7 +64,7 @@ describe 'api/orders', type: :request do
|
||||
end
|
||||
end
|
||||
|
||||
context "and queried within a date range" do
|
||||
context "and queried within a date range" do
|
||||
let(:'q[completed_at_gt]') { Time.zone.today - 7.days - 1.second }
|
||||
let(:'q[completed_at_lt]') { Time.zone.today - 6.days }
|
||||
|
||||
@@ -116,7 +116,7 @@ describe 'api/orders', type: :request do
|
||||
|
||||
context "and queried by a specific order_cycle" do
|
||||
let(:'q[order_cycle_id_eq]') {
|
||||
order_dist_2.order_cycle.id
|
||||
order_dist_2.order_cycle.id
|
||||
}
|
||||
|
||||
before { order_dist_2.distributor.update_attributes owner: user }
|
||||
|
||||
Reference in New Issue
Block a user