Use deliver_method :test for in test environment - thanks to @corny.
This commit is contained in:
parent
b83998a1b2
commit
2ed9ed5897
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue