add testcase Coda Hale also contributed, missed in previous commit

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@500587 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2007-01-27 18:47:56 +00:00
parent f061d45a84
commit ee16eafe72
1 changed files with 8 additions and 1 deletions

View File

@ -35,7 +35,14 @@ class RequestTest < Test::Unit::TestCase
Solr::Request::AddDocument.new("invalid")
end
end
def test_add_multidoc_request
request = Solr::Request::AddDocument.new([{:title => "title1"}, {:title => "title2"}])
assert_equal "<add><doc><field name='title'>title1</field></doc><doc><field name='title'>title2</field></doc></add>", request.to_s
assert_equal :xml, request.response_format
assert_equal 'update', request.handler
end
def test_ping_request
request = Solr::Request::Ping.new
assert_equal :xml, request.response_format