Commit Graph

6 Commits

Author SHA1 Message Date
moyin
bb796a2469 refactor:项目架构重构和命名规范化
- 统一文件命名为snake_case格式(kebab-case  snake_case)
- 重构zulip模块为zulip_core,明确Core层职责
- 重构user-mgmt模块为user_mgmt,统一命名规范
- 调整模块依赖关系,优化架构分层
- 删除过时的文件和目录结构
- 更新相关文档和配置文件

本次重构涉及大量文件重命名和模块重组,
旨在建立更清晰的项目架构和统一的命名规范。
2026-01-08 00:14:14 +08:00
moyin
841a58886e test:添加登录验证码邮件发送测试
为修复的登录验证码邮件模板功能添加专门的测试用例:
- 测试登录验证码邮件发送功能
- 验证邮件模板内容包含正确的登录验证码信息
- 确保邮件主题和内容符合预期
2025-12-25 20:40:27 +08:00
moyin
d4a7b36129 Merge branch 'main' of https://gitea.xinghangee.icu/datawhale/whale-town-end into ANGJustinl-main 2025-12-18 14:12:45 +08:00
moyin
3cfebbc4c4 fix: 修复测试用例中的问题
- 修复邮件服务测试中未使用的变量警告
- 修复验证服务测试中的TTL和返回值期望问题
- 确保所有113个测试用例通过

详细修改:
- email.service.spec.ts: 移除4个未使用的testService变量
- verification.service.spec.ts:
  * 添加TTL mock值避免异常分支
  * 更新getCodeStats期望值包含code和createdAt字段
  * 修正TTL期望值从-1改为-2(Redis标准)

测试结果: 6个测试套件,113个测试用例全部通过
2025-12-18 13:33:40 +08:00
angjustinl
6dece752ef test(email, verification, login): 更新测试中的断言内容, 修复测试error.
- Replace boolean assertions with structured result object checks in email service tests
- Update email service tests to verify success flag and isTestMode property
- Add error message assertions for failed email sending scenarios
- Change logger spy from 'log' to 'warn' for test mode email output
- Update test message to clarify emails are not actually sent in test mode
- Add code and createdAt properties to verification code stats mock data
- Fix TTL mock value from -1 to -2 to correctly represent non-existent keys
- Replace Inject decorator with direct UsersService type injection in LoginCoreService
- Ensure verification service tests properly mock TTL values during code verification
- Improve test coverage by validating complete response structures instead of simple booleans
2025-12-18 13:29:55 +08:00
moyin
3e5c171ff6 feat:添加邮件服务
- 实现完整的邮件发送功能
- 支持验证码邮件发送
- 支持欢迎邮件发送
- 集成SMTP配置和Nodemailer
- 添加邮件模板和HTML格式支持
- 包含完整的单元测试
2025-12-17 20:21:11 +08:00