diff --git a/core/app/models/spree/store_credit_category.rb b/core/app/models/spree/store_credit_category.rb index 067c0276279..b13cf61028f 100644 --- a/core/app/models/spree/store_credit_category.rb +++ b/core/app/models/spree/store_credit_category.rb @@ -7,39 +7,7 @@ class Spree::StoreCreditCategory < Spree::Base class_attribute :non_expiring_credit_types self.non_expiring_credit_types = [Spree::StoreCreditType::NON_EXPIRING] - # @deprecated - class_attribute :reimbursement_category_name - self.reimbursement_category_name = I18n.t('spree.store_credit_category.default') - - # @deprecated - def self.reimbursement_category(reimbursement) - reimbursement.store_credit_category - end - def non_expiring? self.class.non_expiring_credit_types.include? name end - - public_instance_methods.grep(/^reimbursement_category_name/).each do |method| - deprecate( - method => 'Use Spree::Reimbursement#store_credit_category.name instead', - deprecator: Spree::Deprecation - ) - end - - class << self - public_instance_methods.grep(/^reimbursement_category_name/).each do |method| - deprecate( - method => 'Use Spree::Reimbursement.store_credit_category.name instead', - deprecator: Spree::Deprecation - ) - end - - public_instance_methods.grep(/^reimbursement_category$/).each do |method| - deprecate( - method => 'Use Spree::Reimbursement.store_credit_category instead', - deprecator: Spree::Deprecation - ) - end - end end diff --git a/core/spec/models/spree/store_credit_category_spec.rb b/core/spec/models/spree/store_credit_category_spec.rb index ad6c3dfe709..bf6361edbe0 100644 --- a/core/spec/models/spree/store_credit_category_spec.rb +++ b/core/spec/models/spree/store_credit_category_spec.rb @@ -16,26 +16,4 @@ it { expect(store_credit_category).not_to be_non_expiring } end end - - describe '.reimbursement_category' do - it 'raises a dreprecation warning' do - allow(Spree::Deprecation).to receive(:warn) - - described_class.reimbursement_category(Spree::Reimbursement.new) - - expect(Spree::Deprecation).to have_received(:warn) - .with(/reimbursement_category /, any_args) - end - end - - describe '.reimbursement_category_name' do - it 'raises a dreprecation warning' do - allow(Spree::Deprecation).to receive(:warn) - - described_class.reimbursement_category_name - - expect(Spree::Deprecation).to have_received(:warn) - .with(/reimbursement_category_name /, any_args) - end - end end