Skip to content

Commit ec657f6

Browse files
committed
Fixed CI
1 parent 990d6f3 commit ec657f6

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

test/search_test.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,18 @@ def test_search_relation
99
end
1010

1111
def test_unscoped
12-
error = assert_raises(Searchkick::Error) do
12+
if mongoid?
1313
Product.unscoped do
1414
Product.search("*")
1515
end
16+
else
17+
error = assert_raises(Searchkick::Error) do
18+
Product.unscoped do
19+
Product.search("*")
20+
end
21+
end
22+
assert_equal "search must be called on model, not relation", error.message
1623
end
17-
assert_equal "search must be called on model, not relation", error.message
1824

1925
Product.unscoped do
2026
Searchkick.search("*", models: [Product])

0 commit comments

Comments
 (0)