diff options
author | brainopia <brainopia@evilmartians.com> | 2014-12-25 23:46:49 +0300 |
---|---|---|
committer | brainopia <brainopia@evilmartians.com> | 2015-03-04 15:23:25 +0300 |
commit | 8313797810eefb7e00d0b5a8e91ac02907fa5e8f (patch) | |
tree | 6cca4fb79a0b5e9fe660e1e2f89c9ff1e349b695 /activerecord/test | |
parent | 33ae6344834fdf71b93e0b6db899b58e017a7655 (diff) | |
download | rails-8313797810eefb7e00d0b5a8e91ac02907fa5e8f.tar.gz rails-8313797810eefb7e00d0b5a8e91ac02907fa5e8f.tar.bz2 rails-8313797810eefb7e00d0b5a8e91ac02907fa5e8f.zip |
Fix rollback of frozen records
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/transactions_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb index 88e595c39f..922d01601e 100644 --- a/activerecord/test/cases/transactions_test.rb +++ b/activerecord/test/cases/transactions_test.rb @@ -584,6 +584,15 @@ class TransactionTest < ActiveRecord::TestCase assert_not topic.frozen? end + def test_rollback_of_frozen_records + topic = Topic.create.freeze + Topic.transaction do + topic.destroy + raise ActiveRecord::Rollback + end + assert topic.frozen?, 'frozen' + end + def test_sqlite_add_column_in_transaction return true unless current_adapter?(:SQLite3Adapter) |