spec/acceptance/realtime/channel_history_spec.rb in ably-1.0.5 vs spec/acceptance/realtime/channel_history_spec.rb in ably-1.0.6
- old
+ new
@@ -75,10 +75,16 @@
history_page.next do |next_page|
expect(next_page.items.length).to eql(limit)
limit.times do |index|
expect(next_page.items[index].data).to eql("history#{index + limit}")
end
- expect(next_page).to be_last
+ if next_page.has_next?
+ next_page.next do |last|
+ expect(last.items.length).to eql(0)
+ end
+ else
+ expect(next_page).to be_last
+ end
stop_reactor
end
end
end