public ActionResult AcceptInvite(Guid courseId) { Guid userId = Guid.Parse(User.Identity.Name); _memberService.AcceptInvite(courseId, userId); return(Ok()); }
public void AcceptInvite_IsMember() { Guid creator = InstanceFactory.AuthorizedUserId(); Guid otherUser = InstanceFactory.AuthorizedUserId(); Course course = InstanceFactory.Course(); Course createdCourse = _courseService.Create(course, creator); _memberService.SendInvite(createdCourse.Id, otherUser, creator); _memberService.AcceptInvite(createdCourse.Id, otherUser); Assert.IsTrue(_memberService.IsMember(createdCourse.Id, otherUser)); }