Commit 917d0ef305e6d556477c34c6b1a9b403e2c9bf60
1 parent
13f47854
Exists in
master
and in
21 other branches
Fix for load: false behavior - closes #156
Showing
4 changed files
with
8 additions
and
1 deletions
Show diff stats
lib/searchkick.rb
lib/searchkick/results.rb
searchkick.gemspec
... | ... | @@ -21,6 +21,7 @@ Gem::Specification.new do |spec| |
21 | 21 | spec.add_dependency "activemodel" |
22 | 22 | spec.add_dependency "elasticsearch" |
23 | 23 | spec.add_dependency "patron" # persistent http connections for performance |
24 | + spec.add_dependency "hashie" | |
24 | 25 | |
25 | 26 | spec.add_development_dependency "bundler", "~> 1.3" |
26 | 27 | spec.add_development_dependency "rake" | ... | ... |
test/sql_test.rb
... | ... | @@ -250,6 +250,11 @@ class TestSql < Minitest::Unit::TestCase |
250 | 250 | assert_kind_of Hash, Product.search("product", load: false).first |
251 | 251 | end |
252 | 252 | |
253 | + def test_load_false_methods | |
254 | + store_names ["Product A"] | |
255 | + assert_equal "Product A", Product.search("product", load: false).first.name | |
256 | + end | |
257 | + | |
253 | 258 | def test_load_false_with_include |
254 | 259 | store_names ["Product A"] |
255 | 260 | assert_kind_of Hash, Product.search("product", load: false, include: [:store]).first | ... | ... |