Commit bc7b6eff87b3b5183c71dc4390c36775dca1eec0

Authored by Andrew
1 parent 78f1a13a

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 121 def test_misspelling_zucchini_transposition
122 122 store_names ["zucchini"]
123 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 129 end
126 130  
127 131 def test_misspelling_lasagna
... ...
test/test_helper.rb
... ... @@ -46,6 +46,10 @@ def elasticsearch_below60?
46 46 Searchkick.server_below?("6.0.0-alpha1")
47 47 end
48 48  
  49 +def elasticsearch_below61?
  50 + Searchkick.server_below?("6.1.0-alpha1")
  51 +end
  52 +
49 53 def elasticsearch_below22?
50 54 Searchkick.server_below?("2.2.0")
51 55 end
... ...