added custom insertion id regex check

This commit is contained in:
Gani Georgiev
2022-08-11 10:29:01 +03:00
parent ff935a39a1
commit 147344546b
9 changed files with 37 additions and 4 deletions

View File

@@ -653,7 +653,13 @@ func TestRecordUpsertWithCustomId(t *testing.T) {
true,
},
{
"id = 15 chars",
"id = 15 chars (invalid chars)",
map[string]string{"id": "a@3456789012345"},
models.NewRecord(collection),
true,
},
{
"id = 15 chars (valid chars)",
map[string]string{"id": "a23456789012345"},
models.NewRecord(collection),
false,