Fixing last blog specflow tests

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros 2012-02-21 11:15:51 -08:00
parent de7681879b
commit c2d6a28732
4 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
e800b87c0c7de675a59cf35db10d82d75b8625fa src/Orchard.Web/Modules/Orchard.Autoroute
f892519aacc32cbacc562ae5f1461ca9c5fd4919 src/Orchard.Web/Modules/Orchard.Autoroute
c54cb640d6bc14c51b9fb9bd78231bb0facec067 src/Orchard.Web/Modules/Orchard.Forms
204bdef384f41bb5e463bed6b98a056945a7d839 src/Orchard.Web/Modules/Orchard.Rules
ce578373f907c0a55fd91229a344f0755f290174 src/Orchard.Web/Modules/Orchard.TaskLease

View File

@ -67,7 +67,7 @@ Scenario: I can create a new blog with multiple blog posts each with the same ti
And I fill in
| name | value |
| Title.Title | My Post |
| Autoroute.CurrentUrl | my-post |
| Autoroute.CurrentUrl | my-blog/my-post |
| Body.Text | Are you still there? |
And I hit "Publish Now"
And I go to "my-blog/my-post-3"
@ -120,7 +120,7 @@ Scenario: The virtual path of my installation when not at the root is reflected
And I go to "admin/blogs"
And I follow "My Blog"
And I follow "New Post" where class name has "primaryAction"
Then I should see "<span>http\://localhost/OrchardLocal/my-blog/</span>"
Then I should see "<span>http\://localhost/OrchardLocal/</span>"
Scenario: The virtual path of my installation when at the root is reflected in the URL example for the slug field when creating a blog or blog post
Given I have installed Orchard at "/"
@ -133,7 +133,7 @@ Scenario: The virtual path of my installation when at the root is reflected in t
And I go to "admin/blogs"
And I follow "My Blog"
And I follow "New Post" where class name has "primaryAction"
Then I should see "<span>http\://localhost/my-blog/</span>"
Then I should see "<span>http\://localhost/</span>"
Scenario: I set my blog to be the content for the home page and the posts for the blog be rooted to the app
Given I have installed Orchard

View File

@ -235,7 +235,7 @@ this.ScenarioSetup(scenarioInfo);
"My Post"});
table6.AddRow(new string[] {
"Autoroute.CurrentUrl",
"my-post"});
"my-blog/my-post"});
table6.AddRow(new string[] {
"Body.Text",
"Are you still there?"});
@ -385,7 +385,7 @@ this.ScenarioSetup(scenarioInfo);
#line 122
testRunner.And("I follow \"New Post\" where class name has \"primaryAction\"");
#line 123
testRunner.Then("I should see \"<span>http\\://localhost/OrchardLocal/my-blog/</span>\"");
testRunner.Then("I should see \"<span>http\\://localhost/OrchardLocal/</span>\"");
#line hidden
this.ScenarioCleanup();
}
@ -423,7 +423,7 @@ this.ScenarioSetup(scenarioInfo);
#line 135
testRunner.And("I follow \"New Post\" where class name has \"primaryAction\"");
#line 136
testRunner.Then("I should see \"<span>http\\://localhost/my-blog/</span>\"");
testRunner.Then("I should see \"<span>http\\://localhost/</span>\"");
#line hidden
this.ScenarioCleanup();
}

View File

@ -26,7 +26,7 @@ namespace Orchard.Utility.Extensions {
/// <example>http://localhost:3030/OrchardLocal</example>
/// <remarks>Prevents port number issues by using the client requested host</remarks>
public static string ToApplicationRootUrlString(this HttpRequestBase request) {
string url = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Headers["Host"], request.ApplicationPath);
string url = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Headers["Host"], request.ApplicationPath == "/" ? string.Empty : request.ApplicationPath);
return url;
}
@ -36,7 +36,7 @@ namespace Orchard.Utility.Extensions {
/// <example>http://localhost:3030/OrchardLocal</example>
/// <remarks>Prevents port number issues by using the client requested host</remarks>
public static string ToApplicationRootUrlString(this HttpRequest request) {
string url = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Headers["Host"], request.ApplicationPath);
string url = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Headers["Host"], request.ApplicationPath == "/" ? string.Empty : request.ApplicationPath);
return url;
}