Sha256: b2099c75c806c43e28b69ae6ed75d8a71884089bbb172a401f2a4398afc0ae0e

Contents?: true

Size: 463 Bytes

Versions: 14

Compression:

Stored size: 463 Bytes

Contents

require_relative "test_helper"

class TestAutocomplete < Minitest::Unit::TestCase

  def test_autocomplete
    store_names ["Hummus"]
    assert_search "hum", ["Hummus"], autocomplete: true
  end

  def test_autocomplete_two_words
    store_names ["Organic Hummus"]
    assert_search "hum", [], autocomplete: true
  end

  def test_autocomplete_fields
    store_names ["Hummus"]
    assert_search "hum", ["Hummus"], autocomplete: true, fields: [:name]
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
searchkick-0.4.2 test/autocomplete_test.rb
searchkick-0.4.1 test/autocomplete_test.rb
searchkick-0.3.5 test/autocomplete_test.rb
searchkick-0.3.4 test/autocomplete_test.rb
searchkick-0.3.3 test/autocomplete_test.rb
searchkick-0.3.2 test/autocomplete_test.rb
searchkick-0.3.1 test/autocomplete_test.rb
searchkick-0.3.0 test/autocomplete_test.rb
searchkick-0.2.8 test/autocomplete_test.rb
searchkick-0.2.7 test/autocomplete_test.rb
searchkick-0.2.6 test/autocomplete_test.rb
searchkick-0.2.5 test/autocomplete_test.rb
searchkick-0.2.4 test/autocomplete_test.rb
searchkick-0.2.3 test/autocomplete_test.rb