Commit 16a826885660ab67ba345e925a31c5c29c5f736b
1 parent
ee5eed54
Exists in
relation
and in
1 other branch
Removed relation [skip ci]
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
test/relation_test.rb
@@ -9,7 +9,7 @@ class RelationTest < Minitest::Test | @@ -9,7 +9,7 @@ class RelationTest < Minitest::Test | ||
9 | 9 | ||
10 | def test_no_term | 10 | def test_no_term |
11 | store_names ["Product A"] | 11 | store_names ["Product A"] |
12 | - assert_equal ["Product A"], Product.search(relation: true).map(&:name) | 12 | + assert_equal ["Product A"], Product.search.map(&:name) |
13 | end | 13 | end |
14 | 14 | ||
15 | def test_where | 15 | def test_where |
@@ -26,7 +26,7 @@ class RelationTest < Minitest::Test | @@ -26,7 +26,7 @@ class RelationTest < Minitest::Test | ||
26 | Product.where(params) | 26 | Product.where(params) |
27 | end | 27 | end |
28 | assert_raises(ActiveModel::ForbiddenAttributesError) do | 28 | assert_raises(ActiveModel::ForbiddenAttributesError) do |
29 | - Product.search(relation: true).where(params) | 29 | + Product.search.where(params) |
30 | end | 30 | end |
31 | end | 31 | end |
32 | end | 32 | end |
test/similar_test.rb
@@ -8,7 +8,7 @@ class SimilarTest < Minitest::Test | @@ -8,7 +8,7 @@ class SimilarTest < Minitest::Test | ||
8 | 8 | ||
9 | def test_relation | 9 | def test_relation |
10 | store_names ["1% Organic Milk", "2% Organic Milk", "Popcorn"] | 10 | store_names ["1% Organic Milk", "2% Organic Milk", "Popcorn"] |
11 | - assert_equal ["2% Organic Milk"], Product.where(name: "1% Organic Milk").first.similar(relation: true).fields(:name).order(:name).limit(1).map(&:name) | 11 | + assert_equal ["2% Organic Milk"], Product.where(name: "1% Organic Milk").first.similar.fields(:name).order(:name).limit(1).map(&:name) |
12 | end | 12 | end |
13 | 13 | ||
14 | def test_fields | 14 | def test_fields |