blob: fc5dbd0890f6e1a83e54585050881339a5a4ab78 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
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(&:last)
assert_equal binds.uniq, binds
end
end
end
end
|