Sha256: d6c3af70f78b63c6151d77218df5469d83b9a6f3c6a214412b97dab78e0a338a
Contents?: true
Size: 672 Bytes
Versions: 10
Compression:
Stored size: 672 Bytes
Contents
require 'cases/helper' require 'models/post' require 'models/author' module ActiveRecord module Associations class AssociationScopeTest < ActiveRecord::TestCase 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| Arel::Nodes::BindParam === node } assert_equal wheres.uniq, wheres assert_equal binds.uniq, binds end end end end
Version data entries
10 entries across 10 versions & 2 rubygems