test/response_test.rb in mwmitchell-rsolr-ext-0.7.35 vs test/response_test.rb in mwmitchell-rsolr-ext-0.8.0
- old
+ new
@@ -11,11 +11,11 @@
assert r.ok?
end
test 'standard response class' do
raw_response = eval(mock_query_response)
- r = RSolr::Ext::Response::Standard.new(raw_response)
+ 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
@@ -25,11 +25,11 @@
assert r.kind_of?(RSolr::Ext::Response::Facets)
end
test 'standard response doc ext methods' do
raw_response = eval(mock_query_response)
- r = RSolr::Ext::Response::Standard.new(raw_response)
+ r = RSolr::Ext::Response::Base.new(raw_response)
doc = r.docs.first
assert doc.has?(:cat, /^elec/)
assert ! doc.has?(:cat, 'elec')
assert doc.has?(:cat, 'electronics')
@@ -38,11 +38,11 @@
assert_equal 'def', doc.get(:xyz, :default=>'def')
end
test 'Response::Standard facets' do
raw_response = eval(mock_query_response)
- r = RSolr::Ext::Response::Standard.new(raw_response)
+ r = RSolr::Ext::Response::Base.new(raw_response)
assert_equal 2, r.facets.size
field_names = r.facets.collect{|facet|facet.name}
assert field_names.include?('cat')
assert field_names.include?('manu')
@@ -66,10 +66,10 @@
end
test 'response::standard facet_by_field_name' do
raw_response = eval(mock_query_response)
- r = RSolr::Ext::Response::Standard.new(raw_response)
+ r = RSolr::Ext::Response::Base.new(raw_response)
facet = r.facet_by_field_name('cat')
assert_equal 'cat', facet.name
end
=begin
\ No newline at end of file