diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-01-31 23:39:29 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-01-31 23:39:29 -0200 |
commit | f532cd10401cc7b61cae41c6f2d547c2cf790d9c (patch) | |
tree | 30d28becb7e1686353f3c0d65b2c27a0e6a177a7 /activerecord/test/cases/associations | |
parent | e1de54079b2237c4ecbf7511ab5411e5517c272b (diff) | |
download | rails-f532cd10401cc7b61cae41c6f2d547c2cf790d9c.tar.gz rails-f532cd10401cc7b61cae41c6f2d547c2cf790d9c.tar.bz2 rails-f532cd10401cc7b61cae41c6f2d547c2cf790d9c.zip |
Fix broken tests added by 85c724d59
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r-- | activerecord/test/cases/associations/has_many_associations_test.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index b1b0768aab..7146091270 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -1254,7 +1254,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase 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 + assert_equal [companies(:second_client).id, companies(:first_client).id], companies(:first_firm).clients_ordered_by_name_ids end def test_assign_ids_ignoring_blanks @@ -1405,29 +1405,29 @@ class HasManyAssociationsTest < ActiveRecord::TestCase firm.clients.last end end - + def test_custom_primary_key_on_new_record_should_fetch_with_query author = Author.new(:name => "David") assert !author.essays.loaded? - - assert_queries 1 do + + assert_queries 1 do assert_equal 1, author.essays.size end - + assert_equal author.essays, Essay.find_all_by_writer_id("David") - + end - + def test_has_many_custom_primary_key david = authors(:david) assert_equal david.essays, Essay.find_all_by_writer_id("David") end - + def test_blank_custom_primary_key_on_new_record_should_not_run_queries author = Author.new assert !author.essays.loaded? - - assert_queries 0 do + + assert_queries 0 do assert_equal 0, author.essays.size end end |