mirror of
https://github.com/zitadel/zitadel.git
synced 2025-03-01 06:27:23 +00:00

# Which Problems Are Solved * Adds support for the patch user SCIM v2 endpoint # How the Problems Are Solved * Adds support for the patch user SCIM v2 endpoint under `PATCH /scim/v2/{orgID}/Users/{id}` # Additional Context Part of #8140
22 lines
466 B
Go
22 lines
466 B
Go
package scim
|
|
|
|
import (
|
|
"errors"
|
|
"strconv"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
type AssertedScimError struct {
|
|
Error *ScimError
|
|
}
|
|
|
|
func RequireScimError(t require.TestingT, httpStatus int, err error) AssertedScimError {
|
|
require.Error(t, err)
|
|
|
|
var scimErr *ScimError
|
|
require.True(t, errors.As(err, &scimErr))
|
|
require.Equal(t, strconv.Itoa(httpStatus), scimErr.Status)
|
|
return AssertedScimError{scimErr} // wrap it, otherwise error handling is enforced
|
|
}
|