track_inventory_levels is always true in OFN

This commit is contained in:
Luis Ramos
2020-08-06 10:25:09 +01:00
parent 8f19ad0646
commit e0ea25b7a3
2 changed files with 0 additions and 10 deletions

View File

@@ -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

View File

@@ -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