aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/inheritance_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/inheritance_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/inheritance_test.rb')
-rwxr-xr-xactiverecord/test/inheritance_test.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/inheritance_test.rb b/activerecord/test/inheritance_test.rb
index e595ed1e92..d46d0d406b 100755
--- a/activerecord/test/inheritance_test.rb
+++ b/activerecord/test/inheritance_test.rb
@@ -48,9 +48,9 @@ class InheritanceTest < Test::Unit::TestCase
end
def test_inheritance_condition
- assert_equal 3, Company.find_all.length
- assert_equal 1, Firm.find_all.length
- assert_equal 2, Client.find_all.length
+ assert_equal 5, Company.find_all.length
+ assert_equal 2, Firm.find_all.length
+ assert_equal 3, Client.find_all.length
end
def test_alt_inheritance_condition
@@ -82,7 +82,7 @@ class InheritanceTest < Test::Unit::TestCase
def test_destroy_all_within_inheritance
Client.destroy_all
assert_equal 0, Client.find_all.length
- assert_equal 1, Firm.find_all.length
+ assert_equal 2, Firm.find_all.length
end
def test_alt_destroy_all_within_inheritance
@@ -132,4 +132,4 @@ class InheritanceTest < Test::Unit::TestCase
def Company.inheritance_column() "ruby_type" end
end
-end \ No newline at end of file
+end