test/index_test.rb in searchkick-1.4.2 vs test/index_test.rb in searchkick-1.5.0
- old
+ new
@@ -26,9 +26,14 @@
Product.clean_indices
assert !old_index.exists?
end
+ def test_total_docs
+ store_names ["Product A"]
+ assert_equal 1, Product.searchkick_index.total_docs
+ end
+
def test_mapping
store_names ["Dollar Tree"], Store
assert_equal [], Store.search(query: {match: {name: "dollar"}}).map(&:name)
assert_equal ["Dollar Tree"], Store.search(query: {match: {name: "Dollar Tree"}}).map(&:name)
end