public ActionResult Index() { IUmbracoContext umbracoContext = _umbracoContextAccessor.GetRequiredUmbracoContext(); IPublishedContentCache?store = umbracoContext.Content; if (store?.HasContent() ?? false) { // If there is actually content, go to the root. return(Redirect("~/")); } var model = new NoNodesViewModel { UmbracoPath = _hostingEnvironment.ToAbsolute(_globalSettings.UmbracoPath) }; return(View(_globalSettings.NoNodesViewPath, model)); }
public void Has_Content() { Assert.IsTrue(_cache.HasContent()); }