Sha256: fc392dd5ffb587cd55c1f7516167805a80235f132e968fd9d1919f39e1ba550f

Contents?: true

Size: 547 Bytes

Versions: 17

Compression:

Stored size: 547 Bytes

Contents

require 'spec_helper'

describe 'Pubnub::SubscribeEvent' do
  it 'doesnt include same channel to running subscription twice' do
    @pn = Pubnub.new(:subscribe_key => 'demo-36', :publish_key => 'demo-36')

    VCR.use_cassette("subscribe-event-include-test", :record => :all) do
      @pn.subscribe(:http_sync => false, :channel => 'demo'){|e| }
      @pn.subscribe(:http_sync => false, :channel => 'demo'){|e| }

      eventually do
        @pn.env[:subscriptions]['pubsub.pubnub.com'].get_channels.should eq ['demo']
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
pubnub-3.7.12 spec/lib/subscribe_event.rb
pubnub-3.7.11 spec/lib/subscribe_event.rb
pubnub-3.7.10 spec/lib/subscribe_event.rb
pubnub-3.7.9 spec/lib/subscribe_event.rb
pubnub-3.7.7 spec/lib/subscribe_event.rb
pubnub-3.7.5 spec/lib/subscribe_event.rb
pubnub-3.7.1 spec/lib/subscribe_event.rb
pubnub-3.7.0 spec/lib/subscribe_event.rb
pubnub-3.6.10 spec/lib/subscribe_event.rb
pubnub-3.6.9 spec/lib/subscribe_event.rb
pubnub-3.6.7 spec/lib/subscribe_event.rb
pubnub-3.5.14 spec/lib/subscribe_event.rb
pubnub-3.5.12 spec/lib/subscribe_event.rb
pubnub-3.5.8 spec/lib/subscribe_event.rb
pubnub-3.5.7 spec/lib/subscribe_event.rb
pubnub-3.5.6 spec/lib/subscribe_event.rb
pubnub-3.5.5 spec/lib/subscribe_event.rb