spec/unit/models/paginated_result_spec.rb in ably-0.8.2 vs spec/unit/models/paginated_result_spec.rb in ably-0.8.3

- old
+ new

@@ -155,11 +155,11 @@ it 'calls the errback callback when first page headers are missing' do run_reactor do subject.next do |paginated_result| deferrable = subject.first deferrable.errback do |error| - expect(error).to be_a(Ably::Exceptions::InvalidPageError) + expect(error).to be_a(Ably::Exceptions::PageMissing) stop_reactor end end end end @@ -167,14 +167,10 @@ end end end context 'with non paged http response' do - it 'is the first page' do - expect(subject).to be_first - end - it 'is the last page' do expect(subject).to be_last end it 'does not have next page' do @@ -205,14 +201,10 @@ '<./history?index=1>; rel="next"' ].join(', ') } end - it 'is the first page' do - expect(subject).to be_first - end - it 'has next page' do expect(subject).to have_next end it 'is not the last page' do @@ -254,14 +246,10 @@ it 'retrieves the next page of results' do expect(subject.items.length).to eql(next_body.length) expect(subject.items[0][:id]).to eql(next_body[0][:id]) end - it 'is not the first page' do - expect(subject).to_not be_first - end - it 'does not have a next page' do expect(subject).to_not have_next end it 'is the last page' do @@ -284,14 +272,9 @@ end it 'retrieves the first page of results' do expect(subject.items.length).to eql(body.length) end - - it 'is the first page' do - expect(subject).to be_first - end end end end end -