diff options
Diffstat (limited to 'activerecord/test/cases/associations/association_scope_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/association_scope_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/associations/association_scope_test.rb b/activerecord/test/cases/associations/association_scope_test.rb index 3e0032ec73..dd26a85e44 100644 --- a/activerecord/test/cases/associations/association_scope_test.rb +++ b/activerecord/test/cases/associations/association_scope_test.rb @@ -8,9 +8,9 @@ module ActiveRecord test 'does not duplicate conditions' do 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| + wheres = scope.where_clause.predicates.map(&:right) + binds = scope.where_clause.binds.map(&:last) + wheres.reject! { |node| Arel::Nodes::BindParam === node } assert_equal wheres.uniq, wheres |