You've already forked pocketbase
mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-12-01 01:16:08 +02:00
improved auth record errors reporting and updated nested tx test
This commit is contained in:
@@ -318,12 +318,10 @@ func TestRecordUpsertDrySubmitSuccess(t *testing.T) {
|
||||
}
|
||||
|
||||
// ensure that the record changes weren't persisted
|
||||
// ---
|
||||
recordAfter, err := app.Dao().FindRecordById(collection.Id, recordBefore.Id)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if recordAfter.GetString("title") == "dry_test" {
|
||||
t.Fatalf("Expected record.title to be %v, got %v", recordAfter.GetString("title"), "dry_test")
|
||||
}
|
||||
@@ -376,6 +374,11 @@ func TestRecordUpsertDrySubmitWithNestedTx(t *testing.T) {
|
||||
t.Fatalf("Expected callbackCalls to be 1, got %d", callbackCalls)
|
||||
}
|
||||
|
||||
// ensure that the original txDao can still be used after the DrySubmit rollback
|
||||
if _, err := txDao.FindRecordById(collection.Id, recordBefore.Id); err != nil {
|
||||
t.Fatalf("Expected the dry submit rollback to not affect the outer tx context, got %v", err)
|
||||
}
|
||||
|
||||
// ensure that the record changes weren't persisted
|
||||
recordAfter, err := app.Dao().FindRecordById(collection.Id, recordBefore.Id)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user