public void HasPendingKudos_Should_Return_True() { MockKudosLogsForStats(); var actual = _kudosService.HasPendingKudos("User1"); Assert.AreEqual(true, actual); }
public IHttpActionResult DeleteUser(string id) { if (string.IsNullOrEmpty(id)) { return(BadRequest()); } bool canNotBeDeleted = _kudosService.HasPendingKudos(id); if (canNotBeDeleted) { return(Content(HttpStatusCode.MethodNotAllowed, "Employee has pending kudos")); } _userService.Delete(id, GetUserAndOrganization()); return(Ok()); }