mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
track_inventory_levels is always true in OFN
This commit is contained in:
@@ -19,8 +19,6 @@ module Spree
|
||||
private
|
||||
|
||||
def update_stock_item_quantity
|
||||
return unless Spree::Config[:track_inventory_levels]
|
||||
|
||||
stock_item.adjust_count_on_hand quantity
|
||||
end
|
||||
end
|
||||
|
||||
@@ -18,14 +18,6 @@ describe Spree::StockMovement do
|
||||
}.to raise_error(ActiveRecord::ReadOnlyRecord)
|
||||
end
|
||||
|
||||
it 'does not update count on hand when track inventory levels is false' do
|
||||
Spree::Config[:track_inventory_levels] = false
|
||||
subject.quantity = 1
|
||||
subject.save
|
||||
stock_item.reload
|
||||
stock_item.count_on_hand.should == 10
|
||||
end
|
||||
|
||||
context "when quantity is negative" do
|
||||
context "after save" do
|
||||
it "should decrement the stock item count on hand" do
|
||||
|
||||
Reference in New Issue
Block a user