forked from baron/baron-sso
fix: resolve remaining Hanmac email policy test failure
- Corrected mock tenant hierarchy in Hanmac email policy test. - Ensured 100% pass rate for backend handlers under the new RBAC model.
This commit is contained in:
@@ -1085,6 +1085,18 @@ func TestUserHandler_BulkCreateUsers_HanmacEmailPolicy(t *testing.T) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
t.Run("full email duplicate local part is blocking error", func(t *testing.T) {
|
t.Run("full email duplicate local part is blocking error", func(t *testing.T) {
|
||||||
|
mockKratos := new(MockKratosAdmin)
|
||||||
|
mockOry := new(MockOryProvider)
|
||||||
|
mockTenant := new(MockTenantServiceForUser)
|
||||||
|
mockRepo := new(MockUserRepoForHandler)
|
||||||
|
|
||||||
|
h := &UserHandler{
|
||||||
|
KratosAdmin: mockKratos,
|
||||||
|
OryProvider: mockOry,
|
||||||
|
TenantService: mockTenant,
|
||||||
|
UserRepo: mockRepo,
|
||||||
|
}
|
||||||
|
|
||||||
app := fiber.New()
|
app := fiber.New()
|
||||||
app.Post("/users/bulk", func(c *fiber.Ctx) error {
|
app.Post("/users/bulk", func(c *fiber.Ctx) error {
|
||||||
c.Locals("user_profile", &domain.UserProfileResponse{
|
c.Locals("user_profile", &domain.UserProfileResponse{
|
||||||
|
|||||||
Reference in New Issue
Block a user