Sha256: 4138d081e78c41ebe7df9c349f25bf91b042c2205a522007b950e5694edd4b7a

Contents?: true

Size: 688 Bytes

Versions: 10

Compression:

Stored size: 688 Bytes

Contents

require 'spec_helper'
require 'shared/model_behaviour'

describe Ably::Models::ChannelOccupancy do
  subject { Ably::Models::ChannelOccupancy({ metrics: { connections: 1, presence_connections: 2, presence_members: 2, presence_subscribers: 5, publishers: 7, subscribers: 9 } }) }

  describe '#metrics' do
    it 'should return attributes' do
      expect(subject.metrics.connections).to eq(1)
      expect(subject.metrics.presence_connections).to eq(2)
      expect(subject.metrics.presence_members).to eq(2)
      expect(subject.metrics.presence_subscribers).to eq(5)
      expect(subject.metrics.publishers).to eq(7)
      expect(subject.metrics.subscribers).to eq(9)
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
ably-rest-1.2.7 lib/submodules/ably-ruby/spec/unit/models/channel_occupancy_spec.rb
ably-1.2.7 spec/unit/models/channel_occupancy_spec.rb
ably-rest-1.2.6 lib/submodules/ably-ruby/spec/unit/models/channel_occupancy_spec.rb
ably-1.2.6 spec/unit/models/channel_occupancy_spec.rb
ably-rest-1.2.4 lib/submodules/ably-ruby/spec/unit/models/channel_occupancy_spec.rb
ably-1.2.4 spec/unit/models/channel_occupancy_spec.rb
ably-rest-1.2.3 lib/submodules/ably-ruby/spec/unit/models/channel_occupancy_spec.rb
ably-1.2.3 spec/unit/models/channel_occupancy_spec.rb
ably-rest-1.2.2 lib/submodules/ably-ruby/spec/unit/models/channel_occupancy_spec.rb
ably-1.2.2 spec/unit/models/channel_occupancy_spec.rb