Merge pull request #2913 from lingceng/patch-1

Fix TestTransactionWithBlock panic case
This commit is contained in:
Jason Lee 2020-03-05 14:48:31 +08:00 committed by GitHub
commit 7ea143b548
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")
}
}