Sha256: b5232c40ee6f6f34396f09198442bc8d8ad7e89bee7c841d0996d6dced122992
Contents?: true
Size: 729 Bytes
Versions: 23
Compression:
Stored size: 729 Bytes
Contents
require_relative "test_helper" class ReindexJobTest < Minitest::Test def setup super Searchkick.disable_callbacks end def teardown Searchkick.enable_callbacks end def test_create product = Product.create!(name: "Boom") Product.searchkick_index.refresh assert_search "*", [] Searchkick::ReindexJob.new("Product", product.id.to_s).perform Product.searchkick_index.refresh assert_search "*", ["Boom"] end def test_destroy product = Product.create!(name: "Boom") Product.reindex assert_search "*", ["Boom"] product.destroy Searchkick::ReindexJob.new("Product", product.id.to_s).perform Product.searchkick_index.refresh assert_search "*", [] end end
Version data entries
23 entries across 23 versions & 2 rubygems