Add spec for current soft deletion behaviour in OrderCycle#variants_distributed_by scope

This commit is contained in:
Matt-Yorkley
2020-05-04 14:21:58 +02:00
parent d3de1ce47e
commit eb51b87bea

View File

@@ -227,6 +227,14 @@ describe OrderCycle do
expect(oc.variants_distributed_by(d2)).not_to include p1_v_hidden, p1_v_deleted
expect(oc.variants_distributed_by(d1)).to include p2_v
end
context "with soft-deleted variants" do
it "does not consider soft-deleted variants to be currently distributed in the oc" do
p2_v.delete
expect(oc.variants_distributed_by(d1)).to_not include p2_v
end
end
end
context "when hub prefers product selection from inventory only" do