- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestTransactionRaiseErrorOnRollbackAfterCommit (0.36 sec)
-
tests/transaction_test.go
}) }) if err := DB.First(&User{}, "name = ?", "transaction-block-3").Error; err == nil { t.Fatalf("Should not find record after panic rollback") } } func TestTransactionRaiseErrorOnRollbackAfterCommit(t *testing.T) { tx := DB.Begin() user := User{Name: "transaction"} if err := tx.Save(&user).Error; err != nil { t.Fatalf("No error should raise") }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Sep 14 12:58:29 UTC 2024 - 12.9K bytes - Viewed (0)