diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-04-26 17:46:04 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-04-26 18:04:41 +0100 |
commit | 58663218e8025c0d7ab691228fc278bc35e092a7 (patch) | |
tree | e50a873ce77a8774bafc4cf164362bdedabd4a05 /activerecord/test/cases/associations | |
parent | 759d302db851754a73ec4c74e951f8a5faf2bee1 (diff) | |
download | rails-58663218e8025c0d7ab691228fc278bc35e092a7.tar.gz rails-58663218e8025c0d7ab691228fc278bc35e092a7.tar.bz2 rails-58663218e8025c0d7ab691228fc278bc35e092a7.zip |
remove deprecated #first calls
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r-- | activerecord/test/cases/associations/has_many_associations_test.rb | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index 321dae4143..43251a12e3 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -805,7 +805,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase end def test_deleting_updates_counter_cache - topic = Topic.first(:order => "id ASC") + topic = Topic.order("id ASC").first assert_equal topic.replies.to_a.size, topic.replies_count topic.replies.delete(topic.replies.first) @@ -1491,17 +1491,6 @@ class HasManyAssociationsTest < ActiveRecord::TestCase end end - def test_calling_first_or_last_with_find_options_on_loaded_association_should_fetch_with_query - firm = companies(:first_firm) - firm.clients.class # force load target - - assert_queries 2 do - assert firm.clients.loaded? - firm.clients.first(:order => 'name') - firm.clients.last(:order => 'name') - end - end - def test_calling_first_or_last_with_integer_on_association_should_load_association firm = companies(:first_firm) |