mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Ignore master variants exporting to DFC
This commit is contained in:
@@ -9,7 +9,7 @@ class VariantFetcher
|
||||
end
|
||||
|
||||
def scope
|
||||
Spree::Variant.
|
||||
Spree::Variant.not_master.
|
||||
joins(product: :supplier).
|
||||
where('enterprises.id' => @enterprise.id)
|
||||
end
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user