public ActionResult DeletePage(StaticPage page)
 {
     //if (ModelState.IsValid)
     {
         var manager = new AdminManager();
         manager.DeletePage(page);
     }
     return RedirectToAction("Index", "Home");
 }
示例#2
0
        public void CanDeleteStaticPage()
        {
            var manager = new AdminManager();
            var pageCount = manager.GetAllPages().Count;
            var page = manager.GetPageByID(pageCount);

            manager.DeletePage(page);
            var secondCount = manager.GetAllPages().Count;

            Assert.AreEqual(pageCount -1, secondCount);
        }