Ejemplo n.º 1
0
        public void Should_Throw_When_Approving_Other_Organization_Log()
        {
            MockKudosLogsForUpdate();

            var userAndOrg = new UserAndOrganizationDTO
            {
                OrganizationId = 1,
                UserId         = "UserId"
            };

            Assert.Throws <InvalidOperationException>(() => _kudosService.ApproveKudos(1, userAndOrg));
        }
Ejemplo n.º 2
0
 public IHttpActionResult ApproveKudos(int id)
 {
     try
     {
         _kudosService.ApproveKudos(id, GetUserAndOrganization());
         return(Ok());
     }
     catch (ValidationException e) { return(BadRequestWithError(e)); }
 }