Sha256: c2191f1fca51b322090a16159d63156e7d9642820511dbb6688ec1a6877449f3

Contents?: true

Size: 473 Bytes

Versions: 13

Compression:

Stored size: 473 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)
        binds = scope.where_clause.binds.map(&:value)
        assert_equal binds.uniq, binds
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ibm_db-5.5.0 test/cases/associations/association_scope_test.rb
ibm_db-5.4.1 test/cases/associations/association_scope_test.rb
ibm_db-5.4.0 test/cases/associations/association_scope_test.rb
ibm_db-5.3.2 test/cases/associations/association_scope_test.rb
ibm_db-5.3.1 test/cases/associations/association_scope_test.rb
ibm_db-5.2.0 test/cases/associations/association_scope_test.rb
ibm_db-5.1.0 test/cases/associations/association_scope_test.rb
ibm_db-5.0.5 test/cases/associations/association_scope_test.rb
ibm_db-5.0.4 test/cases/associations/association_scope_test.rb
ibm_db-5.0.3 test/cases/associations/association_scope_test.rb
ibm_db-5.0.2 test/cases/associations/association_scope_test.rb
ibm_db-4.0.0-x86-mingw32 test/cases/associations/association_scope_test.rb
ibm_db-4.0.0 test/cases/associations/association_scope_test.rb