test/test_helper.rb in searchkick-1.0.0 vs test/test_helper.rb in searchkick-1.0.1
- old
+ new
@@ -74,10 +74,11 @@
field :description
end
class Store
include Mongoid::Document
+ has_many :products
field :name
end
class Animal
@@ -176,10 +177,11 @@
class Product < ActiveRecord::Base
end
class Store < ActiveRecord::Base
+ has_many :products
end
class Animal < ActiveRecord::Base
end
@@ -255,9 +257,10 @@
end
Product.searchkick_index.delete if Product.searchkick_index.exists?
Product.reindex
Product.reindex # run twice for both index paths
+Product.create!(name: "Set mapping")
Store.reindex
Animal.reindex
class Minitest::Test