test/response_test.rb in rsolr-ext-0.9.6.5 vs test/response_test.rb in rsolr-ext-0.10.0
- old
+ new
@@ -16,12 +16,10 @@
r = RSolr::Ext::Response::Base.new(raw_response)
assert r.respond_to?(:response)
assert r.ok?
assert_equal 11, r.docs.size
assert_equal 'EXPLICIT', r.params[:echoParams]
- assert_equal 1, r.docs.previous_page
- assert_equal 2, r.docs.next_page
#
assert r.kind_of?(RSolr::Ext::Response::Docs)
assert r.kind_of?(RSolr::Ext::Response::Facets)
end
@@ -70,36 +68,7 @@
raw_response = eval(mock_query_response)
r = RSolr::Ext::Response::Base.new(raw_response)
facet = r.facet_by_field_name('cat')
assert_equal 'cat', facet.name
end
-
-=begin
-
- # pagination for facets has been commented out in the response/facets module.
- # ...need to think more about how this can be handled
-
- test 'response::standard facets.paginate' do
- raw_response = eval(mock_query_response)
- raw_response['responseHeader']['params']['facet.offset'] = 1
- raw_response['responseHeader']['params']['facet.limit'] = 2
-
- r = RSolr::Ext::Response::Standard.new(raw_response)
-
- assert_equal 2, r.facets.current_page
-
- # always 1 less than facet.limit
- assert_equal 1, r.facets.per_page
-
- assert_equal 3, r.facets.next_page
-
- assert_equal 1, r.facets.previous_page
-
- # can't know how many pages there are with facets.... so we set it to -1
- assert_equal -1, r.facets.total_pages
-
- assert r.facets.has_next?
- assert r.facets.has_previous?
- end
-=end
end
\ No newline at end of file