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