Use deliver_method :test for in test environment - thanks to @corny.

This commit is contained in:
Thorsten Eckel 2016-12-01 17:22:07 +01:00
parent b83998a1b2
commit 2ed9ed5897

View file

@ -7,7 +7,14 @@ class Channel::Driver::Sendmail
return if Setting.get('import_mode')
mail = Channel::EmailBuild.build(attr, notification)
mail.delivery_method :sendmail
mail.delivery_method delivery_method
mail.deliver
end
private
def delivery_method
return :test if Rails.env.test?
:sendmail
end
end