Started writing NiceUrlProvider unit tests as there are a bunch of issues with it. Have fixed one of them.
Updated unit test hierarchy of classes so that if one doesn't require a db it can opt out and thus it runs much much faster.
This commit is contained in:
@@ -97,7 +97,14 @@ namespace Umbraco.Web.Routing
|
||||
{
|
||||
pathParts.Add(_publishedContentStore.GetDocumentProperty(_umbracoContext, node, UrlNameProperty));
|
||||
node = node.Parent; // set to parent node
|
||||
id = int.Parse(_publishedContentStore.GetDocumentProperty(_umbracoContext, node, "@id")); // will be -1 or 1234
|
||||
if (node == null)
|
||||
{
|
||||
id = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
id = int.Parse(_publishedContentStore.GetDocumentProperty(_umbracoContext, node, "@id")); // will be -1 or 1234
|
||||
}
|
||||
domainUri = id > 0 ? DomainUriAtNode(id, current) : null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user