diff options
Diffstat (limited to 'activerecord/test')
-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 |