Sha256: 48dcd0625b6b0abb57af82910807b3004ad4cff6329e5db6ef0aeaa5f8bc78a6

Contents?: true

Size: 683 Bytes

Versions: 30

Compression:

Stored size: 683 Bytes

Contents

require_relative "test_helper"

class MultiSearchTest < Minitest::Test
  def test_basic
    store_names ["Product A"]
    store_names ["Store A"], Store
    products = Product.search("*", execute: false)
    stores = Store.search("*", execute: false)
    Searchkick.multi_search([products, stores])
    assert_equal ["Product A"], products.map(&:name)
    assert_equal ["Store A"], stores.map(&:name)
  end

  def test_error
    store_names ["Product A"]
    products = Product.search("*", execute: false)
    stores = Store.search("*", order: [:bad_field], execute: false)
    Searchkick.multi_search([products, stores])
    assert !products.error
    assert stores.error
  end
end

Version data entries

30 entries across 30 versions & 3 rubygems

Version Path
searchkick-2.3.1 test/multi_search_test.rb
searchkick-hooopo-2.3.3 test/multi_search_test.rb
searchkick-hooopo-2.3.2 test/multi_search_test.rb
searchkick-hooopo-2.3.1 test/multi_search_test.rb
searchkick-hooopo-2.3.0 test/multi_search_test.rb
searchkick-2.3.0 test/multi_search_test.rb
searchkick-2.2.1 test/multi_search_test.rb
searchkick-2.2.0 test/multi_search_test.rb
searchkick-2.1.1 test/multi_search_test.rb
searchkick-2.1.0 test/multi_search_test.rb
searchkick-2.0.4 test/multi_search_test.rb
searchkick-2.0.3 test/multi_search_test.rb
searchkick-2.0.2 test/multi_search_test.rb
searchkick-2.0.1 test/multi_search_test.rb
searchkick-2.0.0 test/multi_search_test.rb
searchkick-1.5.1 test/multi_search_test.rb
searchkick-1.5.0 test/multi_search_test.rb
searchkick-1.4.2 test/multi_search_test.rb
searchkick-1.4.1 test/multi_search_test.rb
searchkick-1.4.0 test/multi_search_test.rb