Commit 807142dacc56ef11c9488d76d935645c127856b9
Exists in
master
and in
21 other branches
Merge branch 'yuki24-add-entry-name-to-results-class'
Showing
3 changed files
with
7 additions
and
0 deletions
Show diff stats
lib/searchkick/results.rb
test/sql_test.rb
... | ... | @@ -22,6 +22,7 @@ class TestSql < Minitest::Test |
22 | 22 | store_names ["Product A", "Product B", "Product C", "Product D", "Product E", "Product F"] |
23 | 23 | products = Product.search("product", order: {name: :asc}, page: 2, per_page: 2, padding: 1) |
24 | 24 | assert_equal ["Product D", "Product E"], products.map(&:name) |
25 | + assert_equal "product", products.entry_name | |
25 | 26 | assert_equal 2, products.current_page |
26 | 27 | assert_equal 1, products.padding |
27 | 28 | assert_equal 2, products.per_page | ... | ... |
test/test_helper.rb
... | ... | @@ -11,6 +11,8 @@ Minitest::Test = Minitest::Unit::TestCase unless defined?(Minitest::Test) |
11 | 11 | File.delete("elasticsearch.log") if File.exists?("elasticsearch.log") |
12 | 12 | Searchkick.client.transport.logger = Logger.new("elasticsearch.log") |
13 | 13 | |
14 | +I18n.config.enforce_available_locales = true | |
15 | + | |
14 | 16 | if defined?(Mongoid) |
15 | 17 | |
16 | 18 | def mongoid2? | ... | ... |