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') return if Setting.get('import_mode')
mail = Channel::EmailBuild.build(attr, notification) mail = Channel::EmailBuild.build(attr, notification)
mail.delivery_method :sendmail mail.delivery_method delivery_method
mail.deliver mail.deliver
end end
private
def delivery_method
return :test if Rails.env.test?
:sendmail
end
end end