Sha256: 74765c0b7659b1d5bbde20cca64ae34034aa1cad570bfb1a3fb7d8979f40f1de

Contents?: true

Size: 722 Bytes

Versions: 11

Compression:

Stored size: 722 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

11 entries across 11 versions & 1 rubygems

Version Path
propono-0.11.1 test/services/subscriber_test.rb
propono-0.11.0 test/services/subscriber_test.rb
propono-0.10.0 test/services/subscriber_test.rb
propono-0.9.1 test/services/subscriber_test.rb
propono-0.9.0 test/services/subscriber_test.rb
propono-0.8.2 test/services/subscriber_test.rb
propono-0.8.0 test/services/subscriber_test.rb
propono-0.7.0 test/services/subscriber_test.rb
propono-0.6.3 test/services/subscriber_test.rb
propono-0.6.1 test/services/subscriber_test.rb
propono-0.6.0 test/services/subscriber_test.rb