Fix invenrory reset strategy spec

This commit is contained in:
Gaetan Craig-Riou
2024-02-28 10:37:54 +11:00
parent b86d8e1603
commit 94faf4cf69

View File

@@ -7,7 +7,7 @@ RSpec.describe ProductImport::InventoryResetStrategy do
describe '#reset' do
context 'when there are excluded_items_ids' do
let(:enterprise) { variant.product.supplier }
let(:enterprise) { variant.supplier }
let(:variant) { build_stubbed(:variant) }
let!(:variant_override) do
build_stubbed(
@@ -131,7 +131,7 @@ RSpec.describe ProductImport::InventoryResetStrategy do
context 'and supplier_ids is set' do
let(:supplier_ids) { enterprise.id }
let(:enterprise) { variant.product.supplier }
let(:enterprise) { variant.supplier }
let(:variant) { create(:variant) }
context "and variant overrides with count on hand" do
@@ -202,7 +202,7 @@ RSpec.describe ProductImport::InventoryResetStrategy do
context 'and supplier_ids is set' do
let(:supplier_ids) { enterprise.id }
let(:enterprise) { variant.product.supplier }
let(:enterprise) { variant.supplier }
let(:variant) { create(:variant) }
context "and variant overrides with count on hand" do