2019-03-29 16:27:00 +00:00
|
|
|
require 'test_helper'
|
|
|
|
|
|
|
|
|
|
module Builder
|
|
|
|
|
class PublishMessageTest < Minitest::Test
|
|
|
|
|
|
|
|
|
|
def test_publishes_to_propono
|
|
|
|
|
topic = mock
|
|
|
|
|
data = mock
|
|
|
|
|
|
|
|
|
|
client = mock
|
|
|
|
|
client.expects(:publish).with(topic, data, async: false)
|
|
|
|
|
Propono.expects(:configure_client).returns(client)
|
|
|
|
|
|
2019-03-29 16:53:40 +00:00
|
|
|
PublishMessage.(topic, data)
|
2019-03-29 16:27:00 +00:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|