Files
openfoodnetwork/spec/support/email_helper.rb
Maikel Linke e6adb8a3b9 Extract email setup in specs for easy upgrade
The way we set up email sending completely changes with Spree 2. This
change encapsulates that code in a single method so that it can be
changed easily and doesn't create further merge conflicts while we are
still working on the master branch and the Spree upgrade.
2018-10-25 13:53:22 +11:00

12 lines
398 B
Ruby

module OpenFoodNetwork
module EmailHelper
# Some specs trigger actions that send emails, for example creating an order.
# But sending emails doesn't work out-of-the-box. This code sets it up.
# It's here in a single place to allow an easy upgrade to Spree 2 which
# needs a different implementation of this method.
def setup_email
create(:mail_method)
end
end
end