From 85c724d59e46953c52fb457411597fbab90f3a4a Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Tue, 31 Jan 2012 05:47:41 -0800 Subject: Merge pull request #4783 from gregolsen/ids_reader_fix ids_reader method fixed, test added to has_many association (for PostgreSQL) --- activerecord/test/cases/associations/has_many_associations_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/test/cases/associations') diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index f1a341437f..b1b0768aab 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -1253,6 +1253,10 @@ class HasManyAssociationsTest < ActiveRecord::TestCase assert company.clients_using_sql.loaded? end + def test_get_ids_for_ordered_association + assert_equal [companies(:second_client).id, companies(:first_client).id], companies(:first_firm).clients_ordered_by_rating_ids + end + def test_assign_ids_ignoring_blanks firm = Firm.create!(:name => 'Apple') firm.client_ids = [companies(:first_client).id, nil, companies(:second_client).id, ''] -- cgit v1.2.3