aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/deprecated_associations_test.rb
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-06-13 12:03:33 +0000
committerJamis Buck <jamis@37signals.com>2005-06-13 12:03:33 +0000
commit37a370d8d4e3e1a5bf707ffac9cd188c07572248 (patch)
treef97803d54bb21c0f55e2b0c22d53c5c57308b858 /activerecord/test/deprecated_associations_test.rb
parente0537acaeb6c432db844ff835120de7aabb1e39b (diff)
downloadrails-37a370d8d4e3e1a5bf707ffac9cd188c07572248.tar.gz
rails-37a370d8d4e3e1a5bf707ffac9cd188c07572248.tar.bz2
rails-37a370d8d4e3e1a5bf707ffac9cd188c07572248.zip
Be sure to use the @finder_sql in the has_many association's #find method, even if explicit conditions have not been given.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/deprecated_associations_test.rb')
-rwxr-xr-xactiverecord/test/deprecated_associations_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/deprecated_associations_test.rb b/activerecord/test/deprecated_associations_test.rb
index 03587070b5..9f4894beca 100755
--- a/activerecord/test/deprecated_associations_test.rb
+++ b/activerecord/test/deprecated_associations_test.rb
@@ -60,14 +60,14 @@ class DeprecatedAssociationsTest < Test::Unit::TestCase
end
def test_has_many_dependence
- assert_equal 2, Client.find_all.length
+ assert_equal 3, Client.find_all.length
Firm.find_first.destroy
- assert_equal 0, Client.find_all.length
+ assert_equal 1, Client.find_all.length
end
uses_transaction :test_has_many_dependence_with_transaction_support_on_failure
def test_has_many_dependence_with_transaction_support_on_failure
- assert_equal 2, Client.find_all.length
+ assert_equal 3, Client.find_all.length
firm = Firm.find_first
clients = firm.clients
@@ -75,7 +75,7 @@ class DeprecatedAssociationsTest < Test::Unit::TestCase
firm.destroy rescue "do nothing"
- assert_equal 2, Client.find_all.length
+ assert_equal 3, Client.find_all.length
end
def test_has_one_dependence