public ApplicationRole Put(string id, [FromBody] ApplicationRole role) { role.Id = id; foreach (var claim in role.RoleClaims) { claim.RoleId = role.Id; } role = _securityService.UpdateRole(role); return(role); }
public void UpdateRoles_Alway_valid() { var roleModel = new Role() { Id = Guid.NewGuid(), Name = "admin", }; _roleRepository.Update(Arg.Any <Role>()); // Execute _sut.UpdateRole(roleModel); // Assert _roleRepository.Received(1).Update(Arg.Any <Role>()); }