Commit 0ab022d28ad3136de4f833345dcfe3cd5dff3066
1 parent
a52bd93b
Exists in
master
and in
4 other branches
Improved tests [skip ci]
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
test/index_test.rb
@@ -93,6 +93,7 @@ class IndexTest < Minitest::Test | @@ -93,6 +93,7 @@ class IndexTest < Minitest::Test | ||
93 | assert_search "product", ["Product A"], {}, Region | 93 | assert_search "product", ["Product A"], {}, Region |
94 | assert_search "hello", ["Product A"], {fields: [:name, :text]}, Region | 94 | assert_search "hello", ["Product A"], {fields: [:name, :text]}, Region |
95 | assert_search "hello", ["Product A"], {}, Region | 95 | assert_search "hello", ["Product A"], {}, Region |
96 | + assert_search "*", ["Product A"], {where: {text: large_value}}, Region | ||
96 | end | 97 | end |
97 | 98 | ||
98 | def test_very_large_value | 99 | def test_very_large_value |
@@ -102,6 +103,8 @@ class IndexTest < Minitest::Test | @@ -102,6 +103,8 @@ class IndexTest < Minitest::Test | ||
102 | assert_search "product", ["Product A"], {}, Region | 103 | assert_search "product", ["Product A"], {}, Region |
103 | assert_search "hello", ["Product A"], {fields: [:name, :text]}, Region | 104 | assert_search "hello", ["Product A"], {fields: [:name, :text]}, Region |
104 | assert_search "hello", ["Product A"], {}, Region | 105 | assert_search "hello", ["Product A"], {}, Region |
106 | + # keyword not indexed | ||
107 | + assert_search "*", [], {where: {text: large_value}}, Region | ||
105 | end | 108 | end |
106 | 109 | ||
107 | def test_bulk_import_raises_error | 110 | def test_bulk_import_raises_error |