Commit dd0b083645bdbe7ecbeee106db1bc34852fe40d2

Authored by Andrew Kane
1 parent b7410431

Fixed test

Showing 2 changed files with 4 additions and 3 deletions   Show diff stats
@@ -5,6 +5,7 @@ task default: :test @@ -5,6 +5,7 @@ task default: :test
5 Rake::TestTask.new do |t| 5 Rake::TestTask.new do |t|
6 t.libs << "test" 6 t.libs << "test"
7 t.pattern = "test/**/*_test.rb" 7 t.pattern = "test/**/*_test.rb"
  8 + t.warning = false
8 end 9 end
9 10
10 task :benchmark do 11 task :benchmark do
test/index_test.rb
@@ -114,10 +114,10 @@ class IndexTest &lt; Minitest::Test @@ -114,10 +114,10 @@ class IndexTest &lt; Minitest::Test
114 store_names ["Product A"] 114 store_names ["Product A"]
115 raise ActiveRecord::Rollback 115 raise ActiveRecord::Rollback
116 end 116 end
117 - assert_search "product", [] 117 + assert_search "*", []
118 end 118 end
119 119
120 - def test_analyzed_only 120 + def test_filterable
121 # skip for 5.0 since it throws 121 # skip for 5.0 since it throws
122 # Cannot search on field [alt_description] since it is not indexed. 122 # Cannot search on field [alt_description] since it is not indexed.
123 skip unless elasticsearch_below50? 123 skip unless elasticsearch_below50?
@@ -125,7 +125,7 @@ class IndexTest &lt; Minitest::Test @@ -125,7 +125,7 @@ class IndexTest &lt; Minitest::Test
125 assert_search "*", [], where: {alt_description: "Hello"} 125 assert_search "*", [], where: {alt_description: "Hello"}
126 end 126 end
127 127
128 - def test_analyzed_only_large_value 128 + def test_large_value
129 skip if nobrainer? 129 skip if nobrainer?
130 large_value = 10000.times.map { "hello" }.join(" ") 130 large_value = 10000.times.map { "hello" }.join(" ")
131 store [{name: "Product A", alt_description: large_value}] 131 store [{name: "Product A", alt_description: large_value}]