Skip to content

Commit 00372de

Browse files
committed
test: reproduce empty optional attribute constraint violation
1 parent fee97de commit 00372de

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

internal/api/integration_test/user_test.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99

1010
"github.com/stretchr/testify/assert"
1111
"github.com/stretchr/testify/require"
12+
1213
api "github.com/zitadel/nextgen/api/generated"
1314
"github.com/zitadel/nextgen/internal/api/integration_test/helpers"
1415
"github.com/zitadel/nextgen/internal/domain"
@@ -84,6 +85,19 @@ func TestCreateUser(t *testing.T) {
8485
"password": "my-strong-password",
8586
}),
8687
},
88+
{
89+
name: "user with empty value for optional properties",
90+
params: api.CreateUserParams{
91+
ProjectID: api.ProjectID(project.ID),
92+
},
93+
userjson: helpers.MustMarshal(t, map[string]any{
94+
"$schema": "https://test.example.schemas.com/schemas/default-human-user.json",
95+
"email": "john.doe.emptyvalueoptionalproperties@example.com",
96+
"password": "my-strong-password",
97+
"name": "",
98+
"phoneNumber": "",
99+
}),
100+
},
87101
}
88102
for _, tc := range tcs {
89103
t.Run(tc.name, func(t *testing.T) {

0 commit comments

Comments
 (0)