mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-19 04:49:15 +00:00
Get tests broken because of new order cycle shipping method validations working again
This commit is contained in:
committed by
Filipe
parent
a46b77d10c
commit
4e0bf75ecf
@@ -711,9 +711,8 @@ describe Spree::Order do
|
||||
end
|
||||
|
||||
it "keeps the order cycle when it is available at the new distributor" do
|
||||
d = create(:distributor_enterprise)
|
||||
oc = create(:simple_order_cycle)
|
||||
create(:exchange, order_cycle: oc, sender: oc.coordinator, receiver: d, incoming: false)
|
||||
oc = create(:distributor_order_cycle, with_distributor_and_shipping_method: true)
|
||||
d = oc.distributors.first
|
||||
|
||||
subject.order_cycle = oc
|
||||
subject.set_distributor! d
|
||||
@@ -759,7 +758,7 @@ describe Spree::Order do
|
||||
end
|
||||
|
||||
describe "setting the order cycle" do
|
||||
let(:oc) { create(:simple_order_cycle) }
|
||||
let(:oc) { create(:distributor_order_cycle, with_distributor_and_shipping_method: true) }
|
||||
|
||||
it "empties the cart when changing the order cycle" do
|
||||
expect(subject).to receive(:empty!)
|
||||
@@ -777,8 +776,7 @@ describe Spree::Order do
|
||||
end
|
||||
|
||||
it "keeps the distributor when it is available in the new order cycle" do
|
||||
d = create(:distributor_enterprise)
|
||||
create(:exchange, order_cycle: oc, sender: oc.coordinator, receiver: d, incoming: false)
|
||||
d = oc.distributors.first
|
||||
|
||||
subject.distributor = d
|
||||
subject.set_order_cycle! oc
|
||||
|
||||
Reference in New Issue
Block a user