diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-05-19 10:40:27 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-05-19 10:40:27 +0900 |
commit | 5f8115a1859ee883b3289c1e5ed8e5924e4a61b4 (patch) | |
tree | 8677ff87666d7e58d2c0f909eba4c0ef4bdc7ca1 /activerecord/test | |
parent | 870766017ab20541a1e3b10bf026d82522028028 (diff) | |
download | rails-5f8115a1859ee883b3289c1e5ed8e5924e4a61b4.tar.gz rails-5f8115a1859ee883b3289c1e5ed8e5924e4a61b4.tar.bz2 rails-5f8115a1859ee883b3289c1e5ed8e5924e4a61b4.zip |
Rollback correctly restore initial record id after double save
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/transactions_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb index 0d7857c0cf..5b685ca564 100644 --- a/activerecord/test/cases/transactions_test.rb +++ b/activerecord/test/cases/transactions_test.rb @@ -688,6 +688,7 @@ class TransactionTest < ActiveRecord::TestCase raise ActiveRecord::Rollback end + assert_nil topic.id assert_predicate topic, :new_record? end |