public async Task ChangeIsApprovedStatusClubReturnClub() { //Act var result = await controller.ChangeIsApprovedStatusClub(1, 1); //Assert var viewResult = Assert.IsType <RedirectToActionResult>(result); Assert.NotNull(viewResult); Assert.Equal("Club", viewResult.ActionName); }
public void ChangeIsApprovedStatusClubTest() { ChangeIsApprovedStatusRepositorySetup(); //action var controller = new ClubController(repository.Object, usermanager.Object, hostingEnvironment.Object); var result = controller.ChangeIsApprovedStatusClub(1, 1); // assert repository.Verify(r => r.ClubMembers.Update(It.IsAny <ClubMembers>()), Times.Once()); }