test/index_test.rb in searchkick-0.5.1 vs test/index_test.rb in searchkick-0.5.2
- old
+ new
@@ -30,6 +30,19 @@
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
+ if defined?(ActiveRecord)
+
+ def test_transaction
+ Product.transaction do
+ store_names ["Product A"]
+ raise ActiveRecord::Rollback
+ end
+
+ assert_search "product", []
+ end
+
+ end
+
end