U4-6980: Adding supporting unit tests for changes to the template repository

This commit is contained in:
Andy Rose
2015-10-29 15:28:15 +00:00
parent 7b73ed1796
commit f4ae45d8f2
2 changed files with 7 additions and 4 deletions

View File

@@ -683,11 +683,13 @@ namespace Umbraco.Core.Persistence.Repositories
{
var engine = _templateConfig.DefaultRenderingEngine;
var viewHelper = new ViewHelper(_viewsFileSystem);
if (template.Content.IsNullOrWhiteSpace() == false && MasterPageHelper.IsMasterPageSyntax(template.Content) && !viewHelper.ViewExists(template))
if (!viewHelper.ViewExists(template))
{
//there is a design but its definitely a webforms design and we haven't got a MVC view already for it
return RenderingEngine.WebForms;
if (template.Content.IsNullOrWhiteSpace() == false && MasterPageHelper.IsMasterPageSyntax(template.Content))
{
//there is a design but its definitely a webforms design and we haven't got a MVC view already for it
return RenderingEngine.WebForms;
}
}
var masterPageHelper = new MasterPageHelper(_masterpagesFileSystem);

View File

@@ -361,6 +361,7 @@
<Compile Include="Services\MacroServiceTests.cs" />
<Compile Include="Services\UserServiceTests.cs" />
<Compile Include="Manifest\ManifestParserTests.cs" />
<Compile Include="Templates\TemplateRepositoryTests.cs" />
<Compile Include="TestHelpers\BaseSeleniumTest.cs" />
<Compile Include="Integration\InstallPackage.cs" />
<Compile Include="CoreXml\NavigableNavigatorTests.cs" />