mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix rubocop issue Layout/HashAlignment
This commit is contained in:
@@ -6,17 +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: 8
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
||||
# SupportedHashRocketStyles: key, separator, table
|
||||
# SupportedColonStyles: key, separator, table
|
||||
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
||||
Layout/HashAlignment:
|
||||
Exclude:
|
||||
- 'spec/lib/open_food_network/packing_report_spec.rb'
|
||||
- 'spec/models/spree/payment_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
|
||||
@@ -45,7 +45,7 @@ module OpenFoodNetwork
|
||||
context "that has granted P-OC to the distributor" do
|
||||
let(:order2) {
|
||||
create(:order, distributor: distributor, completed_at: 1.day.ago,
|
||||
bill_address: create(:address), ship_address: create(:address))
|
||||
bill_address: create(:address), ship_address: create(:address))
|
||||
}
|
||||
let(:line_item2) {
|
||||
build(:line_item_with_shipment, product: create(:simple_product, supplier: supplier))
|
||||
@@ -54,7 +54,7 @@ module OpenFoodNetwork
|
||||
before do
|
||||
order2.line_items << line_item2
|
||||
create(:enterprise_relationship, parent: supplier, child: distributor,
|
||||
permissions_list: [:add_to_order_cycle])
|
||||
permissions_list: [:add_to_order_cycle])
|
||||
end
|
||||
|
||||
it "shows line items supplied by my producers, with names hidden" do
|
||||
@@ -78,7 +78,7 @@ module OpenFoodNetwork
|
||||
context "that has not granted P-OC to the distributor" do
|
||||
let(:order2) {
|
||||
create(:order, distributor: distributor, completed_at: 1.day.ago,
|
||||
bill_address: create(:address), ship_address: create(:address))
|
||||
bill_address: create(:address), ship_address: create(:address))
|
||||
}
|
||||
let(:line_item2) {
|
||||
build(:line_item_with_shipment, product: create(:simple_product, supplier: supplier))
|
||||
|
||||
@@ -24,9 +24,9 @@ describe Spree::Payment do
|
||||
|
||||
let(:success_response) do
|
||||
double('success_response', :success? => true,
|
||||
:authorization => '123',
|
||||
:avs_result => { 'code' => 'avs-code' },
|
||||
:cvv_result => { 'code' => 'cvv-code', 'message' => "CVV Result"})
|
||||
:authorization => '123',
|
||||
:avs_result => { 'code' => 'avs-code' },
|
||||
:cvv_result => { 'code' => 'cvv-code', 'message' => "CVV Result"})
|
||||
end
|
||||
|
||||
let(:failed_response) { double('gateway_response', :success? => false) }
|
||||
@@ -589,7 +589,7 @@ describe Spree::Payment do
|
||||
it "should build the payment's source" do
|
||||
params = { :amount => 100, :payment_method => gateway,
|
||||
:source_attributes => {
|
||||
:expiry =>"1 / 99",
|
||||
:expiry => "1 / 99",
|
||||
:number => '1234567890123',
|
||||
:verification_value => '123'
|
||||
}
|
||||
@@ -818,7 +818,7 @@ describe Spree::Payment do
|
||||
|
||||
it "creates adjustment" do
|
||||
payment = create(:payment, order: order, payment_method: payment_method,
|
||||
amount: order.total)
|
||||
amount: order.total)
|
||||
expect(payment.adjustment).to be_present
|
||||
expect(payment.adjustment.amount).not_to eq(0)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user