Files
sub2api/openspec/changes/add-delete-unit-tests/proposal.md
yangjianbo f6de36cb04 test(删除): 添加删除单测并修复中间件测试
新增 AdminService 删除路径单元测试与规范场景更新\n同步调整 Google API Key 中间件测试桩与签名
2025-12-29 15:01:19 +08:00

14 lines
546 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Change: Add unit tests for delete paths (user/group/proxy/redeem)
## Why
删除流程缺少单元测试,容易在重构或边界条件变化时回归,且问题排查成本高。
## What Changes
- 新增服务层删除流程单元测试(覆盖 AdminService 删除入口与对应 Repo 错误传播)
- 覆盖成功/不存在/权限保护/幂等删除/底层错误等关键分支
- 需要的轻量测试替身repositories / cache
## Impact
- Affected specs: testing (new)
- Affected code: backend/internal/service/admin_service.go