public IHttpActionResult Follow(int id) { if (_userComicService.IsFollowing(id, UserId)) { _userComicService.Delete(id, UserId); } else { var seriesId = _comicService.GetSeriesIdForComicId(id); if (!_userSeries.IsFollowing(seriesId, UserId)) { _userSeries.Add(seriesId, UserId); } _userComicService.Add(id, UserId); } return(Ok()); }
public void ShouldReturnTrueIfFollowing() { var isFollowing = _service.IsFollowing(12767, UserId); Assert.IsTrue(isFollowing); }