Beispiel #1
0
        public async Task UpdateDone_RedirectsToIndex_WhenTodoItemIsUpdated()
        {
            this._todoItemServiceMock
            .Setup(service => service.UpdateDoneAsync(It.IsAny <Guid>(), It.IsAny <ApplicationUser>()))
            .ReturnsAsync(true);

            var result = await _todosController.UpdateDone(Guid.NewGuid());

            Assert.IsType <RedirectToActionResult>(result);
            Assert.Equal("Index", (result as RedirectToActionResult).ActionName);
        }