diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 49a01ee078..0cf0d5fbaf 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -295,15 +295,6 @@ FactoryBot/SyntaxMethods: - 'spec/models/spree/order_spec.rb' - 'spec/system/admin/bulk_product_update_spec.rb' -# Offense count: 2 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. -# URISchemes: http, https -Layout/LineLength: - Exclude: - - 'app/models/spree/payment.rb' - - 'spec/system/admin/tag_rules_spec.rb' - # Offense count: 16 # Configuration parameters: AllowedMethods. # AllowedMethods: enums diff --git a/app/models/spree/payment.rb b/app/models/spree/payment.rb index 6f32de6f9b..4c209d10d7 100644 --- a/app/models/spree/payment.rb +++ b/app/models/spree/payment.rb @@ -21,7 +21,8 @@ module Spree belongs_to :payment_method, class_name: 'Spree::PaymentMethod' has_many :offsets, -> { where("source_type = 'Spree::Payment' AND amount < 0").completed }, - class_name: "Spree::Payment", foreign_key: :source_id, dependent: :restrict_with_exception + class_name: "Spree::Payment", foreign_key: :source_id, + dependent: :restrict_with_exception has_many :log_entries, as: :source, dependent: :destroy has_one :adjustment, as: :adjustable, dependent: :destroy diff --git a/spec/system/admin/tag_rules_spec.rb b/spec/system/admin/tag_rules_spec.rb index 0215f24c2f..611dcff1df 100644 --- a/spec/system/admin/tag_rules_spec.rb +++ b/spec/system/admin/tag_rules_spec.rb @@ -216,39 +216,39 @@ describe 'Tag Rules' do from: "enterprise_tag_rules_attributes_4_preferred_matched_" \ "shipping_methods_visibility" end - # # Moving the Shipping Methods to top priority - # find(".customer_tag#tg_4 .header", ).drag_to find(".customer_tag#tg_1 .header") + # # Moving the Shipping Methods to top priority + # find(".customer_tag#tg_4 .header", ).drag_to find(".customer_tag#tg_1 .header") # - # click_button 'Update' + # click_button 'Update' # - # # DEFAULT FilterShippingMethods rule - # expect(default_fsm_tag_rule.reload.preferred_customer_tags).to eq "" - # expect(default_fsm_tag_rule.preferred_shipping_method_tags).to eq "volunteers-only" - # expect(default_fsm_tag_rule.preferred_matched_shipping_methods_visibility).to eq "hidden" + # # DEFAULT FilterShippingMethods rule + # expect(default_fsm_tag_rule.reload.preferred_customer_tags).to eq "" + # expect(default_fsm_tag_rule.preferred_shipping_method_tags).to eq "volunteers-only" + # expect(default_fsm_tag_rule.preferred_matched_shipping_methods_visibility).to eq "hidden" # - # # FilterShippingMethods rule - # expect(fsm_tag_rule.reload.priority).to eq 1 - # expect(fsm_tag_rule.preferred_customer_tags).to eq "volunteer" - # expect(fsm_tag_rule.preferred_shipping_method_tags).to eq "volunteers-only4" - # expect(fsm_tag_rule.preferred_matched_shipping_methods_visibility).to eq "visible" + # # FilterShippingMethods rule + # expect(fsm_tag_rule.reload.priority).to eq 1 + # expect(fsm_tag_rule.preferred_customer_tags).to eq "volunteer" + # expect(fsm_tag_rule.preferred_shipping_method_tags).to eq "volunteers-only4" + # expect(fsm_tag_rule.preferred_matched_shipping_methods_visibility).to eq "visible" # - # # FilterProducts rule - # expect(fp_tag_rule.reload.priority).to eq 2 - # expect(fp_tag_rule.preferred_customer_tags).to eq "volunteer" - # expect(fp_tag_rule.preferred_variant_tags).to eq "volunteers-only1" - # expect(fp_tag_rule.preferred_matched_variants_visibility).to eq "hidden" + # # FilterProducts rule + # expect(fp_tag_rule.reload.priority).to eq 2 + # expect(fp_tag_rule.preferred_customer_tags).to eq "volunteer" + # expect(fp_tag_rule.preferred_variant_tags).to eq "volunteers-only1" + # expect(fp_tag_rule.preferred_matched_variants_visibility).to eq "hidden" # - # # FilterPaymentMethods rule - # expect(fpm_tag_rule.reload.priority).to eq 3 - # expect(fpm_tag_rule.preferred_customer_tags).to eq "volunteer" - # expect(fpm_tag_rule.preferred_payment_method_tags).to eq "volunteers-only2" - # expect(fpm_tag_rule.preferred_matched_payment_methods_visibility).to eq "visible" + # # FilterPaymentMethods rule + # expect(fpm_tag_rule.reload.priority).to eq 3 + # expect(fpm_tag_rule.preferred_customer_tags).to eq "volunteer" + # expect(fpm_tag_rule.preferred_payment_method_tags).to eq "volunteers-only2" + # expect(fpm_tag_rule.preferred_matched_payment_methods_visibility).to eq "visible" # - # # FilterOrderCycles rule - # expect(foc_tag_rule.reload.priority).to eq 4 - # expect(foc_tag_rule.preferred_customer_tags).to eq "volunteer" - # expect(foc_tag_rule.preferred_exchange_tags).to eq "volunteers-only3" - # expect(foc_tag_rule.preferred_matched_order_cycles_visibility).to eq "hidden" + # # FilterOrderCycles rule + # expect(foc_tag_rule.reload.priority).to eq 4 + # expect(foc_tag_rule.preferred_customer_tags).to eq "volunteer" + # expect(foc_tag_rule.preferred_exchange_tags).to eq "volunteers-only3" + # expect(foc_tag_rule.preferred_matched_order_cycles_visibility).to eq "hidden" end end