Skip to content

Commit 595ac0b

Browse files
committed
Resolve TestDeeplyNestedTransactionWithBlockAndWrappedCallback CI running failure
1 parent b1530b9 commit 595ac0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/transaction_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ func TestDeeplyNestedTransactionWithBlockAndWrappedCallback(t *testing.T) {
385385
t.Fatalf("Should not find rollbacked record")
386386
}
387387

388-
if err := tx.First(&User{}, "\"name\" = ?", user2.Name).Error; err == nil {
388+
if err := tx.First(&User{}, "\"name\" = ?", user2.Name).Error; err != nil {
389389
t.Fatalf("Should not find saved record")
390390
}
391391
return nil
@@ -401,7 +401,7 @@ func TestDeeplyNestedTransactionWithBlockAndWrappedCallback(t *testing.T) {
401401
t.Fatalf("Should not find rollbacked parent record")
402402
}
403403

404-
if err := DB.First(&User{}, "\"name\" = ?", user2.Name).Error; err == nil {
404+
if err := DB.First(&User{}, "\"name\" = ?", user2.Name).Error; err != nil {
405405
t.Fatalf("Should not find rollbacked nested record")
406406
}
407407
}

0 commit comments

Comments
 (0)