-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathchannel_metrics_spec.rb
42 lines (35 loc) · 1.01 KB
/
channel_metrics_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
require 'spec_helper'
require 'shared/model_behaviour'
describe Ably::Models::ChannelMetrics do
subject { Ably::Models::ChannelMetrics(connections: 1, presence_connections: 2, presence_members: 2, presence_subscribers: 5, publishers: 7, subscribers: 9) }
describe '#connections' do
it 'should return integer' do
expect(subject.connections).to eq(1)
end
end
describe '#presence_connections' do
it 'should return integer' do
expect(subject.presence_connections).to eq(2)
end
end
describe '#presence_members' do
it 'should return integer' do
expect(subject.presence_members).to eq(2)
end
end
describe '#presence_subscribers' do
it 'should return integer' do
expect(subject.presence_subscribers).to eq(5)
end
end
describe '#publishers' do
it 'should return integer' do
expect(subject.publishers).to eq(7)
end
end
describe '#subscribers' do
it 'should return integer' do
expect(subject.subscribers).to eq(9)
end
end
end