Fix specs testing order cancelation email. The email template now needs a order distributor for the signoff part

This commit is contained in:
luisramos0
2019-04-04 13:41:07 +01:00
parent cf3b2308e1
commit 87327f7aa9
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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