From 026baf1a7e936a04cdbbc787cc15efc1cfb2e40a Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Mon, 8 Jun 2020 12:24:34 -0700 Subject: [PATCH] Added test for reindexing relation with should_index? - #1424 --- test/reindex_test.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+), 0 deletions(-) diff --git a/test/reindex_test.rb b/test/reindex_test.rb index b66211f..064dc35 100644 --- a/test/reindex_test.rb +++ b/test/reindex_test.rb @@ -55,6 +55,20 @@ class ReindexTest < Minitest::Test assert_search "product", ["Product A", "Product B"] end + def test_relation_should_index + skip if nobrainer? || cequel? + + skip "TODO make pass in Searchkick 5" + + store_names ["Product A", "Product B"] + Searchkick.callbacks(false) do + Product.find_by(name: "Product B").update!(name: "DO NOT INDEX") + end + Product.where(name: "DO NOT INDEX").reindex + Product.search_index.refresh + assert_search "product", ["Product A"] + end + def test_relation_async skip "Not available yet" end -- libgit2 0.21.0