Commit a52bd93b308b238ea8b239abf901ada91aca910a

Authored by Andrew Kane
1 parent 24e272ab

Improved test [skip ci]

Showing 1 changed file with 2 additions and 3 deletions   Show diff stats
test/index_test.rb
@@ -74,12 +74,11 @@ class IndexTest < Minitest::Test @@ -74,12 +74,11 @@ class IndexTest < Minitest::Test
74 # TODO move 74 # TODO move
75 75
76 def test_filterable 76 def test_filterable
77 - # skip for 5.0 since it throws  
78 - # Cannot search on field [alt_description] since it is not indexed.  
79 store [{name: "Product A", alt_description: "Hello"}] 77 store [{name: "Product A", alt_description: "Hello"}]
80 - assert_raises(Searchkick::InvalidQueryError) do 78 + error = assert_raises(Searchkick::InvalidQueryError) do
81 assert_search "*", [], where: {alt_description: "Hello"} 79 assert_search "*", [], where: {alt_description: "Hello"}
82 end 80 end
  81 + assert_match "Cannot search on field [alt_description] since it is not indexed", error.message
83 end 82 end
84 83
85 def test_filterable_non_string 84 def test_filterable_non_string