aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/eager_test.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-04-26 18:32:55 +0100
committerJon Leighton <j@jonathanleighton.com>2012-04-26 18:32:55 +0100
commit75f03eca753f1e835409a80db1f54f716ef48d18 (patch)
tree6ef084ea2ee7b44c574096274ab6d5fa7a308235 /activerecord/test/cases/associations/eager_test.rb
parentb30996307d3b8d0d519c7ddcfa28fdeed428b602 (diff)
downloadrails-75f03eca753f1e835409a80db1f54f716ef48d18.tar.gz
rails-75f03eca753f1e835409a80db1f54f716ef48d18.tar.bz2
rails-75f03eca753f1e835409a80db1f54f716ef48d18.zip
remove calls to find(:first), find(:last) and find(:all)
Diffstat (limited to 'activerecord/test/cases/associations/eager_test.rb')
-rw-r--r--activerecord/test/cases/associations/eager_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb
index c3eda9431c..95ae158c93 100644
--- a/activerecord/test/cases/associations/eager_test.rb
+++ b/activerecord/test/cases/associations/eager_test.rb
@@ -585,7 +585,7 @@ class EagerAssociationTest < ActiveRecord::TestCase
end
def test_eager_with_has_many_and_limit_with_no_results
- posts = Post.scoped(:includes => [ :author, :comments ], :limit => 2, :where => "posts.title = 'magic forest'").find(:all)
+ posts = Post.scoped(:includes => [ :author, :comments ], :limit => 2, :where => "posts.title = 'magic forest'").all
assert_equal 0, posts.size
end
@@ -1036,7 +1036,7 @@ class EagerAssociationTest < ActiveRecord::TestCase
end
def test_preload_has_many_using_primary_key
- expected = Firm.find(:first).clients_using_primary_key.to_a
+ expected = Firm.first.clients_using_primary_key.to_a
firm = Firm.find :first, :include => :clients_using_primary_key
assert_no_queries do
assert_equal expected, firm.clients_using_primary_key