aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/association_scope_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/associations/association_scope_test.rb')
-rw-r--r--activerecord/test/cases/associations/association_scope_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/association_scope_test.rb b/activerecord/test/cases/associations/association_scope_test.rb
index a5ae3cbb20..3e0032ec73 100644
--- a/activerecord/test/cases/associations/association_scope_test.rb
+++ b/activerecord/test/cases/associations/association_scope_test.rb
@@ -6,8 +6,9 @@ module ActiveRecord
module Associations
class AssociationScopeTest < ActiveRecord::TestCase
test 'does not duplicate conditions' do
- association_scope = AssociationScope.new(Author.new.association(:welcome_posts))
- scope = association_scope.scope
+ scope = AssociationScope.scope(Author.new.association(:welcome_posts),
+ Author.connection)
+ wheres = scope.where_values.map(&:right)
binds = scope.bind_values.map(&:last)
wheres = scope.where_values.map(&:right).reject { |node|
Arel::Nodes::BindParam === node