diff options
author | Michael Koziarski <michael@koziarski.com> | 2009-02-22 16:26:32 +1300 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2009-02-22 16:41:04 +1300 |
commit | 06040849b5a680c2a87893699580f9b9b80f72e4 (patch) | |
tree | c090c310d73d51ddd104b892d3750a5b49705860 /activerecord/test/cases | |
parent | 3248553d3299cbb723f1b4103c16bad7ecdd24a6 (diff) | |
download | rails-06040849b5a680c2a87893699580f9b9b80f72e4.tar.gz rails-06040849b5a680c2a87893699580f9b9b80f72e4.tar.bz2 rails-06040849b5a680c2a87893699580f9b9b80f72e4.zip |
Revert "Wrap calls to update_attributes in a transaction."
This caused failures on sqlite, sqlite3 and postgresql
This reverts commit fc09ebc669bd58f415f7d3ef932ef02dab821ab5.
[#922 state:reopened]
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/transactions_test.rb | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb index bb8b9bb017..40abd935df 100644 --- a/activerecord/test/cases/transactions_test.rb +++ b/activerecord/test/cases/transactions_test.rb @@ -182,40 +182,6 @@ class TransactionTest < ActiveRecord::TestCase end end - def test_update_attribute_should_rollback_on_failure - Developer.before_save do - false - end - developer = Developer.first - developer.audit_logs.clear - 2.times { developer.audit_logs.create(:message => 'message') } - assert_equal 2, developer.audit_logs.size - status = developer.update_attribute(:audit_log_ids, []) - assert !status - assert_equal 2, developer.audit_logs(true).size - end - - def test_update_attributes_should_rollback_on_failure - developer = Developer.first - developer.audit_logs.clear - 2.times { developer.audit_logs.create(:message => 'message') } - assert_equal 2, developer.audit_logs.size - status = developer.update_attributes(:audit_log_ids => [], :name => nil) - assert !status - assert_equal 2, developer.audit_logs(true).size - end - - def test_update_attributes_should_rollback_on_failure! - developer = Developer.first - developer.audit_logs.clear - 2.times { developer.audit_logs.create(:message => 'message') } - assert_equal 2, developer.audit_logs.size - assert_raise(ActiveRecord::RecordInvalid) do - developer.update_attributes!(:audit_log_ids => [], :name => nil) - end - assert_equal 2, developer.audit_logs(true).size - end - def test_nested_explicit_transactions Topic.transaction do Topic.transaction do |