test: 完善单元测试

This commit is contained in:
陈淳
2024-04-29 17:50:51 +08:00
parent 32aca8c6a8
commit 29ee0b5945
16 changed files with 509 additions and 28 deletions

View File

@@ -216,9 +216,11 @@ namespace Yi.Framework.Rbac.Application.Services
{
throw new UserFriendlyException("该系统暂未开放注册功能");
}
//校验验证码,根据电话号码获取 value比对验证码已经uuid
await ValidationPhoneCaptchaAsync(input);
if (_rbacOptions.EnableCaptcha)
{
//校验验证码,根据电话号码获取 value比对验证码已经uuid
await ValidationPhoneCaptchaAsync(input);
}
//注册领域逻辑
await _accountManager.RegisterAsync(input.UserName, input.Password, input.Phone);
}
@@ -231,7 +233,7 @@ namespace Yi.Framework.Rbac.Application.Services
[Route("account")]
[Authorize]
public async Task<UserRoleMenuDto> Get()
public async Task<UserRoleMenuDto> GetAsync()
{
//通过鉴权jwt获取到用户的id
var userId = _currentUser.Id;