Ejemplo n.º 1
0
        public void GetTasks_UserInfoWithRole_NotEmptyTasks()
        {
            var user_info = new UserInfo()
            {
                Id    = 1,
                Roles = new List <string> {
                    ROLE
                }
            };

            var result = _taskCreateService.GetTasks(user_info);

            result.Should().NotBeNullOrEmpty();
        }
Ejemplo n.º 2
0
        public IActionResult GetTypeTasks()
        {
            _logger.LogDebug("GetTypeTasks");
            var tasks = _taskCreateService.GetTasks(_userInfoService.GetUserInfo()).Select(x => new
            {
                code = x.Code,
                name = x.Name
            }).ToList();

            return(new JsonResult(tasks));
        }