test/routing_test.rb in searchkick-2.0.4 vs test/routing_test.rb in searchkick-2.1.0
- old
+ new
@@ -8,6 +8,16 @@
def test_routing_mappings
index_options = Store.searchkick_index.index_options
assert_equal index_options[:mappings][:_default_][:_routing], required: true
end
+
+ def test_routing_correct_node
+ store_names ["Dollar Tree"], Store
+ assert_search "dollar", ["Dollar Tree"], {routing: "Dollar Tree"}, Store
+ end
+
+ def test_routing_incorrect_node
+ store_names ["Dollar Tree"], Store
+ assert_search "dollar", ["Dollar Tree"], {routing: "Boom"}, Store
+ end
end