diff options
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/associations/has_many_associations_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index 247726bc61..e90edbb213 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -129,6 +129,10 @@ class HasManyAssociationsTest < ActiveRecord::TestCase assert_equal "Microsoft", Firm.find(:first).clients_like_ms_with_hash_conditions.first.name end + def test_finding_using_primary_key + assert_equal "Summit", Firm.find(:first).clients_using_primary_key.first.name + end + def test_finding_using_sql firm = Firm.find(:first) first_client = firm.clients_using_sql.first |