Sha256: 64a317c99ba9b5381f699edc37c3ca180d002fbb72dabb36ef9f8345c674ed68

Contents?: true

Size: 384 Bytes

Versions: 9

Compression:

Stored size: 384 Bytes

Contents

require_relative "test_helper"

class TestQuery < Minitest::Test

  def test_basic
    store_names ["Milk", "Apple"]
    query = Product.search("milk", execute: false)
    # query.body = {query: {match_all: {}}}
    # query.body = {query: {match: {name: "Apple"}}}
    query.body[:query] = {match_all: {}}
    assert_equal ["Apple", "Milk"], query.execute.map(&:name).sort
  end

end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
searchkick-0.9.1 test/query_test.rb
searchkick-sinneduy-0.9.0 test/query_test.rb
searchkick-0.9.0 test/query_test.rb
searchkick-0.8.7 test/query_test.rb
searchkick-0.8.6 test/query_test.rb
searchkick-0.8.5 test/query_test.rb
searchkick-0.8.4 test/query_test.rb
searchkick-0.8.3 test/query_test.rb
searchkick-0.8.2 test/query_test.rb