diff options
author | Bryan Stearns <bryanstearns@gmail.com> | 2009-09-30 23:17:50 -0700 |
---|---|---|
committer | Eloy Duran <eloy.de.enige@gmail.com> | 2010-01-08 21:45:02 +0100 |
commit | 1080351437dc43c3ecaa0d494f5ca215f03b1883 (patch) | |
tree | 371ebdf25e1ab947ae9ece41b959b9b6dc0f5a2b /activerecord/test/cases | |
parent | 802b08da0075bf6426c723957447ed85dc849bba (diff) | |
download | rails-1080351437dc43c3ecaa0d494f5ca215f03b1883.tar.gz rails-1080351437dc43c3ecaa0d494f5ca215f03b1883.tar.bz2 rails-1080351437dc43c3ecaa0d494f5ca215f03b1883.zip |
Add failing test that triggers the stack overflow
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/autosave_association_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index 116c8fc509..97d75b651b 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -3,6 +3,8 @@ require 'models/bird' require 'models/company' require 'models/customer' require 'models/developer' +require 'models/invoice' +require 'models/line_item' require 'models/order' require 'models/parrot' require 'models/person' @@ -1215,3 +1217,10 @@ class TestAutosaveAssociationValidationMethodsGeneration < ActiveRecord::TestCas assert !@pirate.respond_to?(:validate_associated_records_for_non_validated_parrots) end end + +class TestAutosaveAssociationWithTouch < ActiveRecord::TestCase + def test_autosave_with_touch_should_not_raise_system_stack_error + invoice = Invoice.create + assert_nothing_raised { invoice.line_items.create(:amount => 10) } + end +end |