diff --git a/core/app/models/concerns/spree/default_price.rb b/core/app/models/concerns/spree/default_price.rb index 78f4c0ae85c..36d2dd2f2a0 100644 --- a/core/app/models/concerns/spree/default_price.rb +++ b/core/app/models/concerns/spree/default_price.rb @@ -14,15 +14,6 @@ def self.default_price_attributes end end - # Returns `#prices` prioritized for being considered as default price - # - # @deprecated - # @return [ActiveRecord::Relation] - def currently_valid_prices - prices.currently_valid - end - deprecate :currently_valid_prices, deprecator: Spree::Deprecation - # Returns {#default_price} or builds it from {Spree::Variant.default_price_attributes} # # @return [Spree::Price, nil] diff --git a/core/spec/models/spree/variant_spec.rb b/core/spec/models/spree/variant_spec.rb index 4841b6281b1..19f4675d380 100644 --- a/core/spec/models/spree/variant_spec.rb +++ b/core/spec/models/spree/variant_spec.rb @@ -373,26 +373,6 @@ end end - describe '#currently_valid_prices' do - around do |example| - Spree::Deprecation.silence do - example.run - end - end - - it 'returns prioritized prices' do - price_1 = create(:price, country: create(:country)) - price_2 = create(:price, country: nil) - variant = create(:variant, prices: [price_1, price_2]) - - result = variant.currently_valid_prices - - expect( - result.index(price_1) < result.index(price_2) - ).to be(true) - end - end - context "#cost_currency" do context "when cost currency is nil" do before { variant.cost_currency = nil }