Sha256: e4a8f0f4cc1adc3b93c131cfa9a168776878fb615adbc4ba7b8eea03b26798f2

Contents?: true

Size: 726 Bytes

Versions: 14

Compression:

Stored size: 726 Bytes

Contents

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

module Propono
  class SubscriberTest < Minitest::Test

    def test_subscribe_by_queue_calls_queue_subscriber
      subscriber = QueueSubscription.new("topic")
      QueueSubscription.expects(:new).with("topic", {}).returns(subscriber)
      QueueSubscription.any_instance.expects(:create)
      Subscriber.subscribe_by_queue("topic")
    end

    def test_subscribe_by_post_calls_post_subscribe
      subscriber = PostSubscription.new("topic", 'endpoint')
      PostSubscription.expects(:new).with("topic", 'endpoint').returns(subscriber)
      PostSubscription.any_instance.expects(:create)
      Subscriber.subscribe_by_post("topic", "endpoint")
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
propono-1.7.0 test/services/subscriber_test.rb
propono-1.6.0 test/services/subscriber_test.rb
propono-1.5.0 test/services/subscriber_test.rb
propono-1.4.0 test/services/subscriber_test.rb
propono-1.3.0 test/services/subscriber_test.rb
propono-1.2.0 test/services/subscriber_test.rb
propono-1.1.3 test/services/subscriber_test.rb
propono-1.1.2 test/services/subscriber_test.rb
propono-1.1.1 test/services/subscriber_test.rb
propono-1.1.0 test/services/subscriber_test.rb
propono-1.0.0 test/services/subscriber_test.rb
propono-1.0.0.rc3 test/services/subscriber_test.rb
propono-1.0.0.rc2 test/services/subscriber_test.rb
propono-1.0.0.rc1 test/services/subscriber_test.rb