Beispiel #1
0
        public async Task MainPageNotLoggedIn()
        {
            var context = new POAMDbContext();

            var apartmentController = new ApartmentController(context);

            var result = await apartmentController.MainPage();

            var redirectResult = Assert.IsType <RedirectResult>(result);

            Assert.NotNull(redirectResult);
            Assert.Equal("~/Home/Index", redirectResult.Url);
        }