diff options
author | Jan De Poorter <jan@defv.be> | 2008-06-03 11:06:59 +0200 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-06-11 13:18:54 +0100 |
commit | d0b3685a0e221b54fdf3c27326564950a419d823 (patch) | |
tree | 1fadcad6671d517747bdd003cd5abb5b4bfadd21 /activerecord/test/cases | |
parent | ca9641f8a7ca1142d0ea99405a079c8699bd443c (diff) | |
download | rails-d0b3685a0e221b54fdf3c27326564950a419d823.tar.gz rails-d0b3685a0e221b54fdf3c27326564950a419d823.tar.bz2 rails-d0b3685a0e221b54fdf3c27326564950a419d823.zip |
Added some has_many tests
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/associations/has_many_associations_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index 1f23ff256c..d3200b1c7f 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -37,15 +37,15 @@ class HasManyAssociationsTest < ActiveRecord::TestCase 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 |