aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/associations_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-12-12 18:12:57 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-12-12 18:12:57 +0000
commit5c50df27cf1a81cd8ace5cad83bc7acee61311da (patch)
treee56ba71ebd564f0e5147f819ca6ded4d46e1a885 /activerecord/test/associations_test.rb
parente1ee02207c75c5b8e5227f64d02c47faa57c8424 (diff)
downloadrails-5c50df27cf1a81cd8ace5cad83bc7acee61311da.tar.gz
rails-5c50df27cf1a81cd8ace5cad83bc7acee61311da.tar.bz2
rails-5c50df27cf1a81cd8ace5cad83bc7acee61311da.zip
Attempted to capture #286 in a unit test, but couldnt get it to fail
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@132 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/associations_test.rb')
-rwxr-xr-xactiverecord/test/associations_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb
index cc4c2374d1..5313485ec4 100755
--- a/activerecord/test/associations_test.rb
+++ b/activerecord/test/associations_test.rb
@@ -296,6 +296,14 @@ class HasManyAssociationsTest < Test::Unit::TestCase
assert_equal 0, Client.find_all.length
end
+ def test_three_levels_of_dependence
+ topic = Topic.create "title" => "neat and simple"
+ reply = topic.replies.create "title" => "neat and simple", "content" => "still digging it"
+ silly_reply = reply.silly_replies.create "title" => "neat and simple", "content" => "ain't complaining"
+
+ assert_nothing_raised { topic.destroy }
+ end
+
def test_dependence_with_transaction_support_on_failure
assert_equal 2, Client.find_all.length
firm = Firm.find_first