Example #1
0
        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);
        }
Example #2
0
        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());
        }