mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-04 07:09:14 +00:00
On enterprise page, do not display products outside of the outgoing exchange
This commit is contained in:
@@ -172,9 +172,9 @@ describe OrderCycle do
|
||||
@e2 = create(:exchange,
|
||||
order_cycle: @oc, sender: @oc.coordinator, receiver: @d2)
|
||||
|
||||
@p0 = create(:product)
|
||||
@p1 = create(:product)
|
||||
@p2 = create(:product)
|
||||
@p0 = create(:simple_product)
|
||||
@p1 = create(:simple_product)
|
||||
@p2 = create(:simple_product)
|
||||
@p2_v = create(:variant, product: @p2)
|
||||
|
||||
@e0.variants << @p0.master
|
||||
@@ -196,6 +196,10 @@ describe OrderCycle do
|
||||
@oc.variants_distributed_by(@d2).should == [@p1.master]
|
||||
end
|
||||
|
||||
it "reports on the products distributed by a particular distributor" do
|
||||
@oc.products_distributed_by(@d2).should == [@p1]
|
||||
end
|
||||
|
||||
it "reports on the products exchanged" do
|
||||
@oc.products.sort.should == [@p0, @p1, @p2]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user