Perform mail delivery in spec to make it pass

We need to purposefully enable deliveries for the deliveries array to
list this email. Otherwise the delivery logic is not executed and thus
the deliveries array never filled.
This commit is contained in:
Pau Perez
2018-11-05 17:49:08 +00:00
parent 50a06d1bd9
commit f7b6867c28

View File

@@ -182,7 +182,9 @@ describe Spree::Admin::OrdersController, type: :controller do
before { distributor.update_attribute(:abn, "123") }
before do
Spree::Config[:mails_from] = "spree@example.com"
ActionMailer::Base.perform_deliveries = true
end
it "should allow me to send order invoices" do
expect do
spree_get :invoice, params