From 1f3d56933fe1c8497863a74a60314fbbde87c668 Mon Sep 17 00:00:00 2001 From: chan Date: Tue, 2 Jun 2026 19:03:16 +0900 Subject: [PATCH] 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. --- backend/internal/handler/user_handler_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/backend/internal/handler/user_handler_test.go b/backend/internal/handler/user_handler_test.go index 94923205..a232e5e8 100644 --- a/backend/internal/handler/user_handler_test.go +++ b/backend/internal/handler/user_handler_test.go @@ -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) { + 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.Post("/users/bulk", func(c *fiber.Ctx) error { c.Locals("user_profile", &domain.UserProfileResponse{