Commit c11635c1251f1741dc50946609ad3ea7b8b678c3

Authored by Andrew Kane
1 parent ee14deb5
Exists in master

Added code for to_yaml to Searchkick::Relation - #1591 [skip ci]

lib/searchkick/relation.rb
... ... @@ -199,6 +199,11 @@ module Searchkick
199 199 !@execute.nil?
200 200 end
201 201  
  202 + # TODO uncomment in 6.0
  203 + # def to_yaml
  204 + # private_execute.to_a.to_yaml
  205 + # end
  206 +
202 207 private
203 208  
204 209 def private_execute
... ...
test/relation_test.rb
... ... @@ -33,4 +33,10 @@ class RelationTest < Minitest::Test
33 33 store_names ["Product A", "Product B"]
34 34 assert_equal ["Product A", "Product B"], Product.search("product").pluck(:name).sort
35 35 end
  36 +
  37 + # TODO uncomment in 6.0
  38 + # def test_to_yaml
  39 + # store_names ["Product A", "Product B"]
  40 + # assert_equal Product.all.to_yaml, Product.search("product").to_yaml
  41 + # end
36 42 end
... ...