Fix TestTransactionWithBlock panic case

Panic will rollback case should use "transaction-3".
This commit is contained in:
Kexian Zhong 2020-03-05 11:55:49 +08:00 committed by GitHub
parent 7180bd0f27
commit 30433f95d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -535,7 +535,7 @@ func TestTransactionWithBlock(t *testing.T) {
})
})
if err := DB.First(&User{}, "name = ?", "transcation").Error; err == nil {
if err := DB.First(&User{}, "name = ?", "transcation-3").Error; err == nil {
t.Errorf("Should not find record after panic rollback")
}
}