Fixing tests for UserController

This commit is contained in:
2025-03-17 20:30:11 +01:00
parent 5bc75de87c
commit e7b3acb91e
4 changed files with 57 additions and 8 deletions

View File

@@ -92,10 +92,6 @@ namespace BasicDotnetTemplate.MainProject.Controllers
}
if (await this._userService.CheckIfEmailIsValid(request.Data.Email))
{
return BadRequest("Invalid email");
}
else
{
var role = await this._roleService.GetRoleForUser(request.Data.RoleGuid);
if (role == null)
@@ -114,6 +110,10 @@ namespace BasicDotnetTemplate.MainProject.Controllers
return Success(String.Empty, userDto);
}
else
{
return BadRequest("Invalid email");
}
}
catch (Exception exception)

View File

@@ -98,7 +98,6 @@ public class UserService : BaseService, IUserService
{
valid = true;
}
return valid;
}