test/boost_test.rb in searchkick-1.5.1 vs test/boost_test.rb in searchkick-2.0.0
- old
+ new
@@ -12,12 +12,10 @@
assert_order "tomato", ["Tomato C", "Tomato B", "Tomato A"]
assert_equal_scores "tomato", conversions: false
end
def test_multiple_conversions
- skip if elasticsearch_below14?
-
store [
{name: "Speaker A", conversions_a: {"speaker" => 1}, conversions_b: {"speaker" => 6}},
{name: "Speaker B", conversions_a: {"speaker" => 2}, conversions_b: {"speaker" => 5}},
{name: "Speaker C", conversions_a: {"speaker" => 3}, conversions_b: {"speaker" => 4}}
], Speaker
@@ -60,29 +58,9 @@
store [
{name: "Product Boost", orders_count: 20},
{name: "Product Conversions", conversions: {"product" => 10}}
]
assert_order "product", ["Product Conversions", "Product Boost"], boost: "orders_count"
- end
-
- def test_user_id
- store [
- {name: "Tomato A"},
- {name: "Tomato B", user_ids: [1, 2, 3]},
- {name: "Tomato C"},
- {name: "Tomato D"}
- ]
- assert_first "tomato", "Tomato B", user_id: 2
- end
-
- def test_personalize
- store [
- {name: "Tomato A"},
- {name: "Tomato B", user_ids: [1, 2, 3]},
- {name: "Tomato C"},
- {name: "Tomato D"}
- ]
- assert_first "tomato", "Tomato B", personalize: {user_ids: 2}
end
def test_boost_fields
store [
{name: "Red", color: "White"},