Sha256: 9303700efd3d7e470dc5a35aac3759f21798eca1e774a700e66b8fec35f5da88

Contents?: true

Size: 441 Bytes

Versions: 12

Compression:

Stored size: 441 Bytes

Contents

require_relative "test_helper"

class QueryTest < 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.map(&:name).sort
    assert_equal ["Apple", "Milk"], query.execute.map(&:name).sort
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
searchkick_bharthur-0.0.2 test/query_test.rb
searchkick_bharthur-0.0.1 test/query_test.rb
searchkick-1.3.1 test/query_test.rb
searchkick-1.3.0 test/query_test.rb
searchkick-1.2.1 test/query_test.rb
searchkick-1.2.0 test/query_test.rb
searchkick-1.1.2 test/query_test.rb
searchkick-1.1.1 test/query_test.rb
searchkick-1.1.0 test/query_test.rb
searchkick-1.0.3 test/query_test.rb
searchkick-1.0.2 test/query_test.rb
searchkick-1.0.1 test/query_test.rb