Replace further deprecated calls to #deliver

See 868d764a.

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/3421/head
Alex Coles 9 years ago
parent 2bd22b052c
commit e40f3758fb
  1. 2
      app/workers/deliver_watcher_notification_job.rb
  2. 6
      spec/workers/mail_notification_jobs/deliver_watcher_notification_job_spec.rb

@ -47,6 +47,6 @@ class DeliverWatcherNotificationJob
UserMailer.work_package_watcher_added(watcher.watchable, watcher.user, watcher_setter)
}
mail.deliver
mail.deliver_now
end
end

@ -45,8 +45,8 @@ describe DeliverWatcherNotificationJob, type: :model do
before do
# make sure no actual calls make it into the UserMailer
allow(UserMailer).to receive(:work_package_watcher_added).and_return(double('mail',
deliver: nil))
allow(UserMailer).to receive(:work_package_watcher_added)
.and_return(double('mail', deliver_now: nil))
end
it 'sends a mail' do
@ -60,7 +60,7 @@ describe DeliverWatcherNotificationJob, type: :model do
describe 'exceptions should be raised' do
before do
mail = double('mail')
allow(mail).to receive(:deliver).and_raise(SocketError)
allow(mail).to receive(:deliver_now).and_raise(SocketError)
expect(UserMailer).to receive(:work_package_watcher_added).and_return(mail)
end

Loading…
Cancel
Save