From 5f8115a1859ee883b3289c1e5ed8e5924e4a61b4 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sat, 19 May 2018 10:40:27 +0900 Subject: Rollback correctly restore initial record id after double save --- activerecord/test/cases/transactions_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/test/cases') 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 -- cgit v1.2.3