From b759b2294d6742d5b046597cdb7cbd2a0a508a94 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sat, 20 Jun 2020 05:13:00 -0700 Subject: [PATCH] Better load test [skip ci] --- test/load_test.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/load_test.rb b/test/load_test.rb index b45bd13..db2955a 100644 --- a/test/load_test.rb +++ b/test/load_test.rb @@ -1,27 +1,27 @@ require_relative "test_helper" class LoadTest < Minitest::Test - def test_load_default + def test_default store_names ["Product A"] assert_kind_of Product, Product.search("product").first end - def test_load_false + def test_false store_names ["Product A"] - assert_kind_of Hash, Product.search("product", load: false).first + assert_kind_of Searchkick::HashWrapper, Product.search("product", load: false).first end - def test_load_false_methods + def test_false_methods store_names ["Product A"] assert_equal "Product A", Product.search("product", load: false).first.name end - def test_load_false_with_includes + def test_false_with_includes store_names ["Product A"] - assert_kind_of Hash, Product.search("product", load: false, includes: [:store]).first + assert_kind_of Searchkick::HashWrapper, Product.search("product", load: false, includes: [:store]).first end - def test_load_false_nested_object + def test_false_nested_object aisle = {"id" => 1, "name" => "Frozen"} store [{name: "Product A", aisle: aisle}] assert_equal aisle, Product.search("product", load: false).first.aisle.to_hash -- libgit2 0.21.0