From 66ff2def8ce2e7502ad29db093f8b4f2dce220ea Mon Sep 17 00:00:00 2001 From: IanShaw027 Date: Thu, 9 Apr 2026 12:39:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(test):=20=E8=A1=A5=E5=85=85=20admin=20servi?= =?UTF-8?q?ce=20=E5=88=86=E7=BB=84=E6=B5=8B=E8=AF=95=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=B2=E6=8C=87=E9=92=88=E8=BE=85=E5=8A=A9=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/internal/service/admin_service_group_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/internal/service/admin_service_group_test.go b/backend/internal/service/admin_service_group_test.go index fa676601..53cd4de6 100644 --- a/backend/internal/service/admin_service_group_test.go +++ b/backend/internal/service/admin_service_group_test.go @@ -10,6 +10,11 @@ import ( "github.com/stretchr/testify/require" ) +func ptrString[T ~string](v T) *string { + s := string(v) + return &s +} + // groupRepoStubForAdmin 用于测试 AdminService 的 GroupRepository Stub type groupRepoStubForAdmin struct { created *Group // 记录 Create 调用的参数