From 4845cde20f4a2d1b558e24de0268b7e418ae31b6 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Fri, 30 Oct 2020 16:03:09 +0000 Subject: [PATCH] Fix rubocop issue Layout/HashAlignment --- .rubocop_todo.yml | 11 ----------- spec/lib/open_food_network/packing_report_spec.rb | 6 +++--- spec/models/spree/payment_spec.rb | 10 +++++----- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index a0e7c3f051..67ff546698 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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. diff --git a/spec/lib/open_food_network/packing_report_spec.rb b/spec/lib/open_food_network/packing_report_spec.rb index 733f0b9cc9..b864a27508 100644 --- a/spec/lib/open_food_network/packing_report_spec.rb +++ b/spec/lib/open_food_network/packing_report_spec.rb @@ -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)) diff --git a/spec/models/spree/payment_spec.rb b/spec/models/spree/payment_spec.rb index b4e1e06fe8..ffb212b011 100644 --- a/spec/models/spree/payment_spec.rb +++ b/spec/models/spree/payment_spec.rb @@ -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