21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-04-30 07:50:49 +02:00
chexpire/test/services/notifier_test.rb
2018-06-04 14:18:12 +02:00

26 lines
609 B
Ruby

require "test_helper"
require "notifier"
class NotifierTest < ActiveSupport::TestCase
test "#process_all process expirable & failures notifications" do
mock = Minitest::Mock.new
mock.expect(:process_expires_soon, nil)
mock.expect(:process_recurrent_failures, nil)
myconfig = "test config"
assert_stub = lambda { |actual_config|
assert_equal myconfig, actual_config,
"Processor was not initialized with the expected configuration"
mock
}
Notifier::Processor.stub :new, assert_stub do
Notifier.process_all(myconfig)
end
mock.verify
end
end