public void CreateReport() { var user = repository.Save(CreateEntry.User()); data.CreateReport(user.Id, UserReportType.Spamming, "mikumiku", "Too much negis!"); repository.List <UserReport>().Should().Contain(rep => rep.Entry.Id == user.Id && rep.User.Id == userWithEmail.Id); user.GroupId.Should().Be(UserGroupId.Regular); user.Active.Should().BeTrue(); }
public bool PostReport(int id, [FromBody] CreateReportModel model) => queries.CreateReport(id, model.ReportType, WebHelper.GetRealHost(Request), model.Reason).created;