mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Actually deliver the exception notifications
This commit is contained in:
parent
afdc50a216
commit
aad8a3a1c5
2 changed files with 5 additions and 2 deletions
|
@ -24,7 +24,7 @@ module Sidekiq
|
|||
end
|
||||
|
||||
def send_to_exception_notifier(msg, ex)
|
||||
::ExceptionNotifier::Notifier.background_exception_notification(ex, :data => { :message => msg })
|
||||
::ExceptionNotifier::Notifier.background_exception_notification(ex, :data => { :message => msg }).deliver
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -66,9 +66,12 @@ class TestExceptionHandler < MiniTest::Unit::TestCase
|
|||
end
|
||||
|
||||
it "notifies ExceptionNotifier" do
|
||||
::ExceptionNotifier::Notifier.expect(:background_exception_notification,nil,[TEST_EXCEPTION, :data => { :message => { :b => 2 } }])
|
||||
mail = MiniTest::Mock.new
|
||||
mail.expect(:deliver,nil)
|
||||
::ExceptionNotifier::Notifier.expect(:background_exception_notification,mail,[TEST_EXCEPTION, :data => { :message => { :b => 2 } }])
|
||||
Component.new.invoke_exception(:b => 2)
|
||||
::ExceptionNotifier::Notifier.verify
|
||||
mail.verify
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue