Commit bc7b6eff87b3b5183c71dc4390c36775dca1eec0
1 parent
78f1a13a
Exists in
master
and in
19 other branches
Fixed tests
Showing
2 changed files
with
9 additions
and
1 deletions
Show diff stats
test/match_test.rb
@@ -121,7 +121,11 @@ class MatchTest < Minitest::Test | @@ -121,7 +121,11 @@ class MatchTest < Minitest::Test | ||
121 | def test_misspelling_zucchini_transposition | 121 | def test_misspelling_zucchini_transposition |
122 | store_names ["zucchini"] | 122 | store_names ["zucchini"] |
123 | assert_search "zuccihni", ["zucchini"] | 123 | assert_search "zuccihni", ["zucchini"] |
124 | - assert_search "zuccihni", [], misspellings: {transpositions: false} | 124 | + |
125 | + # need to specify field | ||
126 | + # as transposition option isn't supported for multi_match queries | ||
127 | + # until Elasticsearch 6.1 | ||
128 | + assert_search "zuccihni", [], misspellings: {transpositions: false}, fields: [:name] | ||
125 | end | 129 | end |
126 | 130 | ||
127 | def test_misspelling_lasagna | 131 | def test_misspelling_lasagna |
test/test_helper.rb
@@ -46,6 +46,10 @@ def elasticsearch_below60? | @@ -46,6 +46,10 @@ def elasticsearch_below60? | ||
46 | Searchkick.server_below?("6.0.0-alpha1") | 46 | Searchkick.server_below?("6.0.0-alpha1") |
47 | end | 47 | end |
48 | 48 | ||
49 | +def elasticsearch_below61? | ||
50 | + Searchkick.server_below?("6.1.0-alpha1") | ||
51 | +end | ||
52 | + | ||
49 | def elasticsearch_below22? | 53 | def elasticsearch_below22? |
50 | Searchkick.server_below?("2.2.0") | 54 | Searchkick.server_below?("2.2.0") |
51 | end | 55 | end |