Sha256: 409a1d33da2228f49d7f6a808b77ee5d6bb68cfc0c0c112f79f042ec65e4ef22
Contents?: true
Size: 772 Bytes
Versions: 6
Compression:
Stored size: 772 Bytes
Contents
require_relative "test_helper" class ReindexV2JobTest < Minitest::Test def setup skip unless defined?(ActiveJob) super end def test_create product = Searchkick.callbacks(false) { Product.create!(name: "Boom") } Product.search_index.refresh assert_search "*", [] Searchkick::ReindexV2Job.perform_later("Product", product.id.to_s) Product.search_index.refresh assert_search "*", ["Boom"] end def test_destroy product = Searchkick.callbacks(false) { Product.create!(name: "Boom") } Product.reindex assert_search "*", ["Boom"] Searchkick.callbacks(false) { product.destroy } Searchkick::ReindexV2Job.perform_later("Product", product.id.to_s) Product.search_index.refresh assert_search "*", [] end end
Version data entries
6 entries across 6 versions & 2 rubygems