mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove dead code, this method was removed in spree 2.0.4
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user