fix(test): 补充 admin service 分组测试字符串指针辅助函数
This commit is contained in:
@@ -10,6 +10,11 @@ import (
|
|||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func ptrString[T ~string](v T) *string {
|
||||||
|
s := string(v)
|
||||||
|
return &s
|
||||||
|
}
|
||||||
|
|
||||||
// groupRepoStubForAdmin 用于测试 AdminService 的 GroupRepository Stub
|
// groupRepoStubForAdmin 用于测试 AdminService 的 GroupRepository Stub
|
||||||
type groupRepoStubForAdmin struct {
|
type groupRepoStubForAdmin struct {
|
||||||
created *Group // 记录 Create 调用的参数
|
created *Group // 记录 Create 调用的参数
|
||||||
|
|||||||
Reference in New Issue
Block a user