lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb in ably-rest-0.8.1 vs lib/submodules/ably-ruby/spec/acceptance/rest/presence_spec.rb in ably-rest-0.8.2
- old
+ new
@@ -52,10 +52,12 @@
let(:page_size) { 3 }
let(:presence_page) { fixtures_channel.presence.get(limit: page_size) }
it 'returns a paged response limiting number of members per page' do
expect(presence_page.items.size).to eql(page_size)
+ # TODO: To be enabled once Realtime Presence issue #164 is resolved
+ # expect(presence_page).to be_first
next_page = presence_page.next
expect(next_page.items.size).to eql(page_size)
expect(next_page).to be_last
end
end
@@ -79,11 +81,11 @@
context 'direction: :forwards' do
let(:history_page) { fixtures_channel.presence.history(direction: :forwards) }
let(:paged_history_forward) { fixtures_channel.presence.history(limit: page_size, direction: :forwards) }
it 'returns recent presence activity forwards with most recent history last' do
- expect(paged_history_forward).to be_a(Ably::Models::PaginatedResource)
+ expect(paged_history_forward).to be_a(Ably::Models::PaginatedResult)
expect(paged_history_forward.items.size).to eql(page_size)
next_page = paged_history_forward.next
expect(paged_history_forward.items.first.id).to eql(history_page.items.first.id)
@@ -94,10 +96,10 @@
context 'direction: :backwards' do
let(:history_page) { fixtures_channel.presence.history(direction: :backwards) }
let(:paged_history_backward) { fixtures_channel.presence.history(limit: page_size, direction: :backwards) }
it 'returns recent presence activity backwards with most recent history first' do
- expect(paged_history_backward).to be_a(Ably::Models::PaginatedResource)
+ expect(paged_history_backward).to be_a(Ably::Models::PaginatedResult)
expect(paged_history_backward.items.size).to eql(page_size)
next_page = paged_history_backward.next
expect(paged_history_backward.items.first.id).to eql(history_page.items.first.id)