Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Add entity test, to show text goes through literally

Erik Hatcher6a3597cdb7c7
diff --git a/client/ruby/solr-ruby/test/functional/server_test.rb b/client/ruby/solr-ruby/test/functional/server_test.rb
index eee6ca83b01..5b6e57bbfe5 100644
--- a/client/ruby/solr-ruby/test/functional/server_test.rb
+++ b/client/ruby/solr-ruby/test/functional/server_test.rb
@@ -199,6 +199,13 @@ class ServerTest < Test::Unit::TestCase
response = @connection.send(request)
assert_equal ["Apache >>Solr<<"], response.highlighted(1, :title_text)
end
+
+ def test_entities
+ @connection.add(:id => 1, :title_text => "&nbsp;")
+ response = @connection.query('nbsp')
+ assert_equal 1, response.total_hits
+ assert_equal '1', response.hits[0]['id']
+ end
# wipe the index clean
def clean