Sha256: 883fc8859610fb8deda9c9debb1dcf3526c00310f76168ec3e5fbeaa6b56b3d0

Contents?: true

Size: 724 Bytes

Versions: 3

Compression:

Stored size: 724 Bytes

Contents

require File.expand_path('../test_helper', __FILE__)

module Propono
  class PostSubscriberTest < Minitest::Test
    def test_create_topic
      topic = 'foobar'
      TopicCreator.expects(:find_or_create).with(topic)
      PostSubscriber.subscribe(topic, "foobar")
    end

    def test_subscribe_calls_subscribe
      arn = "arn123"
      endpoint = "http://meducation.net/some_queue_name"

      TopicCreator.stubs(find_or_create: arn)

      sns = mock()
      sns.expects(:subscribe).with(arn, endpoint, 'http')
      subscriber = PostSubscriber.new("Some topic", endpoint)
      subscriber.stubs(sns: sns)
      subscriber.subscribe
    end

    def test_it_correctly_uses_http_and_https
      skip
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
propono-0.3.0 test/post_subscriber_test.rb
propono-0.2.0 test/post_subscriber_test.rb
propono-0.1.0 test/post_subscriber_test.rb