1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-24 07:04:51 +02:00

added temp collections cache

This commit is contained in:
Gani Georgiev
2024-04-25 10:05:47 +03:00
parent 2b82c36bdd
commit 950f796cbc
5 changed files with 82 additions and 1 deletions

View File

@@ -1270,6 +1270,7 @@ func TestRecordCrudCreate(t *testing.T) {
if err := app.Dao().WithoutHooks().SaveCollection(collection); err != nil {
t.Fatalf("failed to update demo3 collection create rule: %v", err)
}
core.ReloadCachedCollections(app)
},
ExpectedStatus: 400,
ExpectedContent: []string{`"data":{}`},
@@ -1291,6 +1292,7 @@ func TestRecordCrudCreate(t *testing.T) {
if err := app.Dao().WithoutHooks().SaveCollection(collection); err != nil {
t.Fatalf("failed to update demo3 collection create rule: %v", err)
}
core.ReloadCachedCollections(app)
},
ExpectedStatus: 200,
ExpectedContent: []string{
@@ -1929,6 +1931,7 @@ func TestRecordCrudUpdate(t *testing.T) {
if err := app.Dao().WithoutHooks().SaveCollection(collection); err != nil {
t.Fatalf("failed to update demo3 collection update rule: %v", err)
}
core.ReloadCachedCollections(app)
},
ExpectedStatus: 404,
ExpectedContent: []string{`"data":{}`},
@@ -1950,6 +1953,7 @@ func TestRecordCrudUpdate(t *testing.T) {
if err := app.Dao().WithoutHooks().SaveCollection(collection); err != nil {
t.Fatalf("failed to update demo3 collection update rule: %v", err)
}
core.ReloadCachedCollections(app)
},
ExpectedStatus: 200,
ExpectedContent: []string{