spec/api/query/ordering_pagination_examples.rb in sunspot-2.1.1 vs spec/api/query/ordering_pagination_examples.rb in sunspot-2.2.0

- old
+ new

@@ -44,9 +44,23 @@ paginate :page => '3', :per_page => '15' end connection.should have_last_search_with(:rows => 15, :start => 30) end + it 'paginates with initial cursor' do + search do + paginate :cursor => '*', :per_page => 15 + end + connection.should have_last_search_with(:rows => 15, :cursorMark => '*') + end + + it 'paginates with given cursor' do + search do + paginate :cursor => 'AoIIP4AAACxQcm9maWxlIDEwMTk=' + end + connection.should have_last_search_with(:cursorMark => 'AoIIP4AAACxQcm9maWxlIDEwMTk=') + end + it 'orders by a single field' do search do order_by :average_rating, :desc end connection.should have_last_search_with(:sort => 'average_rating_ft desc')