mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 08:37:32 +00:00
chore: move the go code into a subfolder
This commit is contained in:
21
apps/api/internal/integration/scim/assertions.go
Normal file
21
apps/api/internal/integration/scim/assertions.go
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user