Sha256: 0a6ca29dff4bbd0487c7f675eb8404e2bb0e6415254c1647362420688693811e
Contents?: true
Size: 961 Bytes
Versions: 6
Compression:
Stored size: 961 Bytes
Contents
require 'helper' class TestJrubyStreamingUpdateSolrServer < Test::Unit::TestCase should "Write some tests, but don't know how to mock up a solr server" do assert_equal 1, 1 end should "Report nil for a document that doesn't include a field" do doc = SolrInputDocument.new assert_equal nil, doc[:notinthere] end should "Return single and multiple values in arrays" do doc = SolrInputDocument.new doc << [:id, 1] assert_equal [1], doc[:id] doc << [:id, 2] assert_equal [1,2], doc[:id] end should "Add items in hash via merge!" do doc = SolrInputDocument.new doc << [:id, 1] h = {:id => 2, :name => 'Bill'} doc.merge! h assert_equal [1,2], doc[:id] assert_equal ['Bill'], doc[:name] end should "Destroy existing items via []=" do doc = SolrInputDocument.new doc[:id] = 1 assert_equal [1], doc[:id] doc[:id] = 2 assert_equal [2], doc[:id] end end
Version data entries
6 entries across 6 versions & 1 rubygems