aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-02-14 06:12:51 +0900
committerGitHub <noreply@github.com>2019-02-14 06:12:51 +0900
commit840f55567191c96bdf4250a339759dbb532d351e (patch)
treef94a181eb7c660e3b7fa09af49ba37b9bfe561dd /activerecord/test/cases
parentaf6ade0cfd09e3d3d9ebd304a2afae4d60a044dc (diff)
parent4f2a635661077fd5c3097e2a4c1496760600132a (diff)
downloadrails-840f55567191c96bdf4250a339759dbb532d351e.tar.gz
rails-840f55567191c96bdf4250a339759dbb532d351e.tar.bz2
rails-840f55567191c96bdf4250a339759dbb532d351e.zip
Merge pull request #35258 from kamipo/revert_32380
Revert "Chaining named scope is no longer leaking to class level querying methods"
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/scoping/named_scoping_test.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/test/cases/scoping/named_scoping_test.rb b/activerecord/test/cases/scoping/named_scoping_test.rb
index 27f9df295f..1a3a95f168 100644
--- a/activerecord/test/cases/scoping/named_scoping_test.rb
+++ b/activerecord/test/cases/scoping/named_scoping_test.rb
@@ -447,9 +447,8 @@ class NamedScopingTest < ActiveRecord::TestCase
assert_equal [posts(:sti_comments)], Post.with_special_comments.with_post(4).to_a.uniq
end
- def test_chaining_doesnt_leak_conditions_to_another_scopes
- expected = Topic.where(approved: false).where(id: Topic.children.select(:parent_id))
- assert_equal expected.to_a, Topic.rejected.has_children.to_a
+ def test_class_method_in_scope
+ assert_equal [topics(:second)], topics(:first).approved_replies.ordered
end
def test_nested_scoping