Commit a3519d197594f377a1552e98929c0f42304e8eb2
1 parent
1008d10a
Exists in
master
and in
19 other branches
Added test for dynamic fields - #914
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
test/match_test.rb
@@ -243,6 +243,11 @@ class MatchTest < Minitest::Test | @@ -243,6 +243,11 @@ class MatchTest < Minitest::Test | ||
243 | assert_order "wheat bread", ["Wheat Bread", "Whole Wheat Bread"], match: :phrase | 243 | assert_order "wheat bread", ["Wheat Bread", "Whole Wheat Bread"], match: :phrase |
244 | end | 244 | end |
245 | 245 | ||
246 | + def test_dynamic_fields | ||
247 | + store_names ["Red Bull"], Speaker | ||
248 | + assert_search "redbull", ["Red Bull"], {fields: [:name]}, Speaker | ||
249 | + end | ||
250 | + | ||
246 | def test_unsearchable | 251 | def test_unsearchable |
247 | store [ | 252 | store [ |
248 | {name: "Unsearchable", description: "Almond"} | 253 | {name: "Unsearchable", description: "Almond"} |