fix tests

This commit is contained in:
Stephan
2015-02-03 20:58:13 +01:00
parent 80b23f8fa7
commit 70b325a189
2 changed files with 9 additions and 3 deletions

View File

@@ -145,7 +145,7 @@ namespace Umbraco.Tests.Routing
[TestCase("http://domain1.com/fr/1001-2-1", 100121, "fr-FR")]
[TestCase("http://domain1.com/1001-3", 10013, "en-US")]
[TestCase("http://domain2.com/1002", 1002, "en-US")]
[TestCase("http://domain2.com/1002", 1002, null)]
[TestCase("http://domain3.com/", 1003, "en-US")]
[TestCase("http://domain3.com/en", 10031, "en-US")]
@@ -155,12 +155,15 @@ namespace Umbraco.Tests.Routing
[TestCase("http://domain3.com/1003-3", 10033, "en-US")]
[TestCase("https://domain1.com/", 1001, "en-US")]
[TestCase("https://domain3.com/", 1001, "en-US")] // because domain3 is explicitely set on http
[TestCase("https://domain3.com/", 1001, null)] // because domain3 is explicitely set on http
public void Lookup_NestedDomains(string url, int expectedId, string expectedCulture)
{
SetDomains4();
// defaults depend on test environment
expectedCulture = expectedCulture ?? System.Threading.Thread.CurrentThread.CurrentUICulture.Name;
SettingsForTests.HideTopLevelNodeFromPath = true;
var routingContext = GetRoutingContext(url);

View File

@@ -179,7 +179,7 @@ namespace Umbraco.Tests.Routing
[TestCase("http://domain1.com/fr", "fr-FR", 10012)] // domain takes over local wildcard at 10012
[TestCase("http://domain1.com/fr/1001-2-1", "fr-FR", 100121)] // domain takes over local wildcard at 10012
[TestCase("/1003", "en-US", 1003)] // default culture (no domain)
[TestCase("/1003", null, 1003)] // default culture (no domain)
[TestCase("/1003/1003-1", "nl-NL", 10031)] // wildcard on 10031 applies
[TestCase("/1003/1003-1/1003-1-1", "nl-NL", 100311)] // wildcard on 10031 applies
#endregion
@@ -187,6 +187,9 @@ namespace Umbraco.Tests.Routing
{
SetDomains2();
// defaults depend on test environment
expectedCulture = expectedCulture ?? System.Threading.Thread.CurrentThread.CurrentUICulture.Name;
var routingContext = GetRoutingContext(inputUrl);
var url = routingContext.UmbracoContext.CleanedUmbracoUrl; //very important to use the cleaned up umbraco url
var pcr = new PublishedContentRequest(url, routingContext);