1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-29 08:56:58 +02:00

[#80] fixed before hooks data and added optional interceptor to upsert submit

This commit is contained in:
Gani Georgiev
2022-07-12 13:42:06 +03:00
parent ce857985be
commit 05a4071eba
20 changed files with 547 additions and 161 deletions

View File

@@ -748,9 +748,6 @@ func TestUserCreate(t *testing.T) {
`"email":{"code":"validation_required"`,
`"password":{"code":"validation_required"`,
},
ExpectedEvents: map[string]int{
"OnUserBeforeCreateRequest": 1,
},
},
{
Name: "invalid data",
@@ -764,9 +761,6 @@ func TestUserCreate(t *testing.T) {
`"password":{"code":"validation_length_out_of_range"`,
`"passwordConfirm":{"code":"validation_values_mismatch"`,
},
ExpectedEvents: map[string]int{
"OnUserBeforeCreateRequest": 1,
},
},
{
Name: "valid data but with disabled email/pass auth",
@@ -868,9 +862,6 @@ func TestUserUpdate(t *testing.T) {
`"data":{`,
`"email":{"code":"validation_user_email_exists"`,
},
ExpectedEvents: map[string]int{
"OnUserBeforeUpdateRequest": 1,
},
},
{
Name: "authorized as admin - valid data",