Remove dead code, this method was removed in spree 2.0.4

This commit is contained in:
Luis Ramos
2020-07-01 17:48:43 +01:00
parent 7a03f57da0
commit 2e33e02d7f
2 changed files with 1 additions and 9 deletions

View File

@@ -315,13 +315,5 @@ module Spree
def update_order
order.update!
end
# NOTE: This is an override of spree's method, needed to allow orders
# without line items (ie. user invoices) to not have inventory units
def require_inventory
return false unless line_items.count > 0 # This line altered
order.completed? && !order.canceled?
end
end
end

View File

@@ -339,7 +339,7 @@ describe Spree::Shipment do
context "#ship" do
before do
order.stub(:update!)
shipment.stub(require_inventory: false, update_order: true, state: 'ready')
shipment.stub(update_order: true, state: 'ready')
shipment.stub(adjustment: charge)
shipping_method.stub(:create_adjustment)
shipment.stub(:ensure_correct_adjustment)