mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-06 22:36:07 +00:00
Fix specs testing order cancelation email. The email template now needs a order distributor for the signoff part
This commit is contained in:
@@ -417,7 +417,7 @@ describe Spree::OrdersController, type: :controller do
|
||||
end
|
||||
|
||||
context "when the order is complete" do
|
||||
let(:order) { create(:completed_order_with_totals, user: user) }
|
||||
let(:order) { create(:completed_order_with_totals, user: user, distributor: create(:distributor_enterprise)) }
|
||||
|
||||
before do
|
||||
setup_email
|
||||
|
||||
@@ -489,7 +489,7 @@ describe Spree::Order do
|
||||
end
|
||||
|
||||
it "finds only orders not in specified state" do
|
||||
o = FactoryBot.create(:completed_order_with_totals)
|
||||
o = FactoryBot.create(:completed_order_with_totals, distributor: create(:distributor_enterprise))
|
||||
o.cancel!
|
||||
Spree::Order.not_state(:canceled).should_not include o
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user