Commit 47902322191c53222b5ecd8a7f5a2b21d528c371
1 parent
e69d6913
Exists in
master
and in
8 other branches
Added test for should_index with async: true - #1424
Showing
1 changed file
with
11 additions
and
0 deletions
Show diff stats
test/reindex_test.rb
... | ... | @@ -96,6 +96,17 @@ class ReindexTest < Minitest::Test |
96 | 96 | assert_search "product", ["Product A"] |
97 | 97 | end |
98 | 98 | |
99 | + def test_full_async_should_index | |
100 | + skip unless defined?(ActiveJob) | |
101 | + | |
102 | + store_names ["Product A", "Product B", "DO NOT INDEX"], reindex: false | |
103 | + reindex = Product.reindex(async: true) | |
104 | + | |
105 | + index = Searchkick::Index.new(reindex[:index_name]) | |
106 | + index.refresh | |
107 | + assert_equal 2, index.total_docs | |
108 | + end | |
109 | + | |
99 | 110 | def test_full_async_wait |
100 | 111 | skip unless defined?(ActiveJob) && defined?(Redis) |
101 | 112 | ... | ... |