mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Ensure AssociationCollection#count works with empty condition. [#271 state:resolved] [Jan De Poorter]
This commit is contained in:
@@ -32,6 +32,10 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
|
||||
assert_equal 2, Firm.find(:first).plain_clients.count
|
||||
end
|
||||
|
||||
def test_counting_with_empty_hash_conditions
|
||||
assert_equal 2, Firm.find(:first).plain_clients.count(:conditions => {})
|
||||
end
|
||||
|
||||
def test_counting_with_single_conditions
|
||||
assert_equal 2, Firm.find(:first).plain_clients.count(:conditions => '1=1')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user