Commit 6d888a90ac7111884611e49942783d7f0f2bd36f

Authored by Andrew Kane
1 parent 1bc72e34

Fixed docs for exact - #997

Showing 2 changed files with 7 additions and 1 deletions   Show diff stats
README.md
... ... @@ -261,7 +261,7 @@ Available options are:
261 261  
262 262 ### Exact Matches
263 263  
264   -To match a field exactly (case-insensitive), use:
  264 +To match a field exactly (case-sensitive), use:
265 265  
266 266 ```ruby
267 267 User.search query, fields: [{email: :exact}, :name]
... ...
test/autocomplete_test.rb
... ... @@ -72,4 +72,10 @@ class AutocompleteTest < Minitest::Test
72 72 store_names ["hi@example.org"]
73 73 assert_search "hi@example.org", ["hi@example.org"], fields: [{name: :exact}]
74 74 end
  75 +
  76 + def test_exact_case
  77 + store_names ["Hello"]
  78 + assert_search "hello", [], fields: [{name: :exact}]
  79 + assert_search "Hello", ["Hello"], fields: [{name: :exact}]
  80 + end
75 81 end
... ...