mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Result of running rubocop -a, safe auto correct
This commit is contained in:
@@ -16,16 +16,6 @@ Gemspec/RequiredRubyVersion:
|
||||
- 'engines/order_management/order_management.gemspec'
|
||||
- 'engines/web/web.gemspec'
|
||||
|
||||
# Offense count: 3
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
||||
# SupportedStyles: with_first_argument, with_fixed_indentation
|
||||
Layout/ArgumentAlignment:
|
||||
Exclude:
|
||||
- 'app/models/spree/stock/availability_validator.rb'
|
||||
- 'spec/features/consumer/account/payments_spec.rb'
|
||||
- 'spec/queries/payments_requiring_action_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
@@ -683,12 +673,6 @@ Style/PreferredHashMethods:
|
||||
Exclude:
|
||||
- 'app/controllers/api/v0/shipments_controller.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
Style/RedundantSelf:
|
||||
Exclude:
|
||||
- 'app/models/spree/payment/processing.rb'
|
||||
|
||||
# Offense count: 223
|
||||
Style/Send:
|
||||
Exclude:
|
||||
|
||||
@@ -236,8 +236,8 @@ module Spree
|
||||
if response.cvv_result
|
||||
self.cvv_response_code = response.cvv_result['code']
|
||||
self.cvv_response_message = response.cvv_result['message']
|
||||
if self.cvv_response_message.present?
|
||||
return self.require_authorization!
|
||||
if cvv_response_message.present?
|
||||
return require_authorization!
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -47,8 +47,8 @@ module Spree
|
||||
display_name = variant.name.to_s
|
||||
display_name += %{(#{variant.options_text})} if variant.options_text.present?
|
||||
line_item.errors.add(:quantity, Spree.t(:out_of_stock,
|
||||
scope: :order_populator,
|
||||
item: display_name.inspect))
|
||||
scope: :order_populator,
|
||||
item: display_name.inspect))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -16,10 +16,9 @@ feature "Payments requiring action", js: true do
|
||||
context "there is a payment requiring authorization" do
|
||||
let!(:payment) do
|
||||
create(:payment,
|
||||
order: order,
|
||||
cvv_response_message: "https://stripe.com/redirect",
|
||||
state: "requires_authorization"
|
||||
)
|
||||
order: order,
|
||||
cvv_response_message: "https://stripe.com/redirect",
|
||||
state: "requires_authorization")
|
||||
end
|
||||
|
||||
it "shows a table of payments requiring authorization" do
|
||||
|
||||
@@ -11,10 +11,9 @@ describe PaymentsRequiringAction do
|
||||
context "payment has a cvv_response_message" do
|
||||
let(:payment) do
|
||||
create(:payment,
|
||||
order: order,
|
||||
cvv_response_message: "https://stripe.com/redirect",
|
||||
state: "requires_authorization"
|
||||
)
|
||||
order: order,
|
||||
cvv_response_message: "https://stripe.com/redirect",
|
||||
state: "requires_authorization")
|
||||
end
|
||||
|
||||
it "finds the payment" do
|
||||
|
||||
Reference in New Issue
Block a user