Commit aca0830f3d99e279fea4821ec818d68636a901e9
1 parent
926f9dc5
Exists in
master
and in
21 other branches
Test dangerous reindex with inheritance
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
test/index_test.rb
@@ -114,6 +114,11 @@ class IndexTest < Minitest::Test | @@ -114,6 +114,11 @@ class IndexTest < Minitest::Test | ||
114 | assert_search "product", ["Product A"] | 114 | assert_search "product", ["Product A"] |
115 | end | 115 | end |
116 | 116 | ||
117 | + def test_dangerous_reindex_inheritance | ||
118 | + skip if mongoid2? || nobrainer? | ||
119 | + assert_raises(Searchkick::DangerousOperation) { Dog.where(id: [1, 2, 3]).reindex } | ||
120 | + end | ||
121 | + | ||
117 | if defined?(ActiveRecord) | 122 | if defined?(ActiveRecord) |
118 | 123 | ||
119 | def test_transaction | 124 | def test_transaction |