Ignore master variants exporting to DFC

This commit is contained in:
Maikel Linke
2023-03-14 14:21:10 +11:00
parent 6e514acc77
commit 2105c0d0ea
2 changed files with 1 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ class VariantFetcher
end
def scope
Spree::Variant.
Spree::Variant.not_master.
joins(product: :supplier).
where('enterprises.id' => @enterprise.id)
end

View File

@@ -14,8 +14,6 @@ describe VariantFetcher do
it "returns the variants of a supplier" do
product = create(:product, supplier: enterprise)
pending "ignoring of the master variant"
# it currently returns two variants instead of one
expect(subject.scope.count).to eq 1
expect(subject.scope).to eq product.variants
end