Browse files

Added some has_many tests

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
1 parent 20442ac commit c83a1839464a77cb774fc4a04cefa53b36248041 @DefV DefV committed with lifo Jun 3, 2008
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/test/cases/associations/has_many_associations_test.rb
View
6 activerecord/test/cases/associations/has_many_associations_test.rb
@@ -37,15 +37,15 @@ def test_counting_with_empty_hash_conditions
end
def test_counting_with_single_conditions
- assert_equal 2, Firm.find(:first).plain_clients.count(:conditions => '1=1')
+ assert_equal 1, Firm.find(:first).plain_clients.count(:conditions => 'name="Microsoft"')
end
def test_counting_with_single_hash
- assert_equal 2, Firm.find(:first).plain_clients.count(:conditions => '1=1')
+ assert_equal 1, Firm.find(:first).plain_clients.count(:conditions => {:name => "Microsoft"})
end
def test_counting_with_column_name_and_hash
- assert_equal 2, Firm.find(:first).plain_clients.count(:all, :conditions => '1=1')
+ assert_equal 2, Firm.find(:first).plain_clients.count(:name)
end
def test_finding

0 comments on commit c83a183

Please sign in to comment.