Skip to content

Commit ac26e18

Browse files
committed
Fixed test warnings
1 parent 6e32aeb commit ac26e18

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

test/log_subscriber_test.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,19 @@ def test_reindex_relation
5353
end
5454

5555
def test_search
56+
# prevent warnings
57+
Product.searchkick_index.refresh
58+
5659
output = capture_logs do
5760
Product.search("product").to_a
5861
end
5962
assert_match "Product Search", output
6063
end
6164

6265
def test_multi_search
66+
# prevent warnings
67+
Product.searchkick_index.refresh
68+
6369
output = capture_logs do
6470
Searchkick.multi_search([Product.search("product")])
6571
end

test/support/helpers.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ def store(documents, model = default_model, reindex: true)
4545
model.create!(documents.shuffle)
4646
end
4747
end
48+
# prevent warnings
49+
model.searchkick_index.refresh
4850
end
4951
end
5052

0 commit comments

Comments
 (0)