Sha256: d4e6b8e91807d6aec03527c9d701a62218ca41b68727ea29fe4e8b5153ce5d7b

Contents?: true

Size: 727 Bytes

Versions: 25

Compression:

Stored size: 727 Bytes

Contents

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

module Propono
  class PostSubscriptionTest < Minitest::Test
    def test_create_topic
      topic = 'foobar'
      TopicCreator.expects(:find_or_create).with(topic)
      PostSubscription.create(topic, "foobar")
    end

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

      TopicCreator.stubs(find_or_create: arn)

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

    def test_it_correctly_uses_http_and_https
      skip
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
propono-1.7.0 test/components/post_subscription_test.rb
propono-1.6.0 test/components/post_subscription_test.rb
propono-1.5.0 test/components/post_subscription_test.rb
propono-1.4.0 test/components/post_subscription_test.rb
propono-1.3.0 test/components/post_subscription_test.rb
propono-1.2.0 test/components/post_subscription_test.rb
propono-1.1.3 test/components/post_subscription_test.rb
propono-1.1.2 test/components/post_subscription_test.rb
propono-1.1.1 test/components/post_subscription_test.rb
propono-1.1.0 test/components/post_subscription_test.rb
propono-1.0.0 test/components/post_subscription_test.rb
propono-1.0.0.rc3 test/components/post_subscription_test.rb
propono-1.0.0.rc2 test/components/post_subscription_test.rb
propono-1.0.0.rc1 test/components/post_subscription_test.rb
propono-0.11.1 test/components/post_subscription_test.rb
propono-0.11.0 test/components/post_subscription_test.rb
propono-0.10.0 test/components/post_subscription_test.rb
propono-0.9.1 test/components/post_subscription_test.rb
propono-0.9.0 test/components/post_subscription_test.rb
propono-0.8.2 test/components/post_subscription_test.rb