mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing some preliminary specflow tests.
--HG-- branch : 1.x
This commit is contained in:
@@ -337,7 +337,7 @@ namespace Orchard.Specs.Bindings {
|
||||
public void WhenIAmRedirected() {
|
||||
var urlPath = "";
|
||||
if (Details.ResponseHeaders.TryGetValue("Location", out urlPath)) {
|
||||
WhenIGoTo(urlPath.Replace("http://127.0.0.1/", ""));
|
||||
WhenIGoTo(urlPath);
|
||||
}
|
||||
else {
|
||||
Assert.Fail("Expected to be redirected but no Location header returned");
|
||||
|
@@ -31,7 +31,12 @@ namespace Orchard.Specs.Hosting {
|
||||
details.UrlPath = urlPath.Substring(0, queryIndex).Replace('\\', '/');
|
||||
details.Query = urlPath.Substring(queryIndex + 1);
|
||||
}
|
||||
details.Page = (isHomepage ? "" : physicalPath.Combine(details.UrlPath.TrimStart('/', '\\')).GetRelativePath(physicalPath).ToString()).Replace('\\','/');
|
||||
|
||||
var physicalFilePath = physicalPath.Combine(details.UrlPath.TrimStart('/', '\\'));
|
||||
details.Page = (isHomepage ? "" : physicalFilePath.GetRelativePath(physicalPath).ToString());
|
||||
|
||||
if (!File.Exists(physicalFilePath))
|
||||
details.Page = details.Page.Replace('\\', '/');
|
||||
|
||||
if (!string.IsNullOrEmpty(webHost.Cookies)) {
|
||||
details.RequestHeaders.Add("Cookie", webHost.Cookies);
|
||||
|
Reference in New Issue
Block a user