diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-01-31 05:47:41 -0800 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-01-31 05:47:41 -0800 |
commit | 98e1735d1d622ad07a8441df4eb280d7a8e96a05 (patch) | |
tree | fc7ef7dca6c61f005056a3e14803479e78e3ddd1 /activerecord/test/cases/associations/has_many_associations_test.rb | |
parent | 30a232800382b3194f4cb2e2d2ad37075e2149db (diff) | |
parent | f13a1dd781d57128cd53a9b070248b8bc13edaeb (diff) | |
download | rails-98e1735d1d622ad07a8441df4eb280d7a8e96a05.tar.gz rails-98e1735d1d622ad07a8441df4eb280d7a8e96a05.tar.bz2 rails-98e1735d1d622ad07a8441df4eb280d7a8e96a05.zip |
Merge pull request #4783 from gregolsen/ids_reader_fix
ids_reader method fixed, test added to has_many association (for PostgreSQL)
Diffstat (limited to 'activerecord/test/cases/associations/has_many_associations_test.rb')
-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 8c7956406a..367f87031c 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -1278,6 +1278,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, ''] |