diff --git a/src/Orchard.Specs/Admin.feature b/src/Orchard.Specs/Admin.feature
index f6ef8c581..7771038d4 100644
--- a/src/Orchard.Specs/Admin.feature
+++ b/src/Orchard.Specs/Admin.feature
@@ -1,9 +1,9 @@
-Feature: The Admin side of the app
- In order to manage my site
- As a privileged user
- I want to not have my cheese moved in the admin
-
-Scenario: The current version of Orchard is displayed in the admin
+Feature: The Admin side of the app
+ In order to manage my site
+ As a privileged user
+ I want to not have my cheese moved in the admin
+
+Scenario: The current version of Orchard is displayed in the admin
Given I have installed Orchard
When I go to "admin"
- Then I should see "
Orchard v(?:\.\d+){2,4}
"
+ Then I should see "
Orchard v(?:\.\d+){2,4}
"
diff --git a/src/Orchard.Specs/Admin.feature.cs b/src/Orchard.Specs/Admin.feature.cs
index 0618ba599..342961165 100644
--- a/src/Orchard.Specs/Admin.feature.cs
+++ b/src/Orchard.Specs/Admin.feature.cs
@@ -30,8 +30,8 @@ namespace Orchard.Specs
public virtual void FeatureSetup()
{
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
- TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "The Admin side of the app", "In order to manage my site\nAs a privileged user\nI want to not have my cheese move" +
- "d in the admin", GenerationTargetLanguage.CSharp, ((string[])(null)));
+ TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "The Admin side of the app", "In order to manage my site\r\nAs a privileged user\r\nI want to not have my cheese mo" +
+ "ved in the admin", GenerationTargetLanguage.CSharp, ((string[])(null)));
testRunner.OnFeatureStart(featureInfo);
}
diff --git a/src/Orchard.Specs/Bindings/WebAppHosting.cs b/src/Orchard.Specs/Bindings/WebAppHosting.cs
index 2d2222dfc..a3f9ec6da 100644
--- a/src/Orchard.Specs/Bindings/WebAppHosting.cs
+++ b/src/Orchard.Specs/Bindings/WebAppHosting.cs
@@ -233,6 +233,11 @@ namespace Orchard.Specs.Bindings {
Assert.That(Details.StatusDescription, Is.EqualTo(statusDescription));
}
+ [Then(@"the content type should be ""(.*)""")]
+ public void ThenTheContentTypeShouldBe(string contentType) {
+ Assert.That(Details.ResponseHeaders["Content-Type"], Is.StringMatching(contentType));
+ }
+
[Then(@"I should see ""(.*)""")]
public void ThenIShouldSee(string text) {
Assert.That(Details.ResponseText, Is.StringMatching(text));
diff --git a/src/Orchard.Specs/Blogs.feature b/src/Orchard.Specs/Blogs.feature
index 3703b6472..5e7a75dfc 100644
--- a/src/Orchard.Specs/Blogs.feature
+++ b/src/Orchard.Specs/Blogs.feature
@@ -1,4 +1,4 @@
-Feature: Blog management
+Feature: Blog
In order to add blogs to my site
As an author
I want to create blogs and create, publish and edit blog posts
@@ -121,4 +121,8 @@ Scenario: Enabling remote blog publishing inserts the appropriate metaweblogapi
| Routable.Title | My Blog |
And I hit "Save"
And I go to "my-blog"
- Then I should see ""
+ Then I should see ""
+ When I go to "/XmlRpc/LiveWriter/Manifest"
+ Then the content type should be "\btext/xml\b"
+ And I should see ""
+ And I should see "Metaweblog"
diff --git a/src/Orchard.Specs/Blogs.feature.cs b/src/Orchard.Specs/Blogs.feature.cs
index 98ded7f35..1f76b321b 100644
--- a/src/Orchard.Specs/Blogs.feature.cs
+++ b/src/Orchard.Specs/Blogs.feature.cs
@@ -17,8 +17,8 @@ namespace Orchard.Specs
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.4.0.0")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()]
- [NUnit.Framework.DescriptionAttribute("Blog management")]
- public partial class BlogManagementFeature
+ [NUnit.Framework.DescriptionAttribute("Blog")]
+ public partial class BlogFeature
{
private static TechTalk.SpecFlow.ITestRunner testRunner;
@@ -30,7 +30,7 @@ namespace Orchard.Specs
public virtual void FeatureSetup()
{
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
- TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Blog management", "In order to add blogs to my site\r\nAs an author\r\nI want to create blogs and create" +
+ TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Blog", "In order to add blogs to my site\r\nAs an author\r\nI want to create blogs and create" +
", publish and edit blog posts", GenerationTargetLanguage.CSharp, ((string[])(null)));
testRunner.OnFeatureStart(featureInfo);
}
@@ -378,8 +378,17 @@ this.ScenarioSetup(scenarioInfo);
#line 123
testRunner.And("I go to \"my-blog\"");
#line 124
- testRunner.Then("I should see \"\"");
+ testRunner.Then("I should see \"\"");
+#line 125
+ testRunner.When("I go to \"/XmlRpc/LiveWriter/Manifest\"");
+#line 126
+ testRunner.Then("the content type should be \"\\btext/xml\\b\"");
+#line 127
+ testRunner.And("I should see \"\"");
+#line 128
+ testRunner.And("I should see \"Metaweblog\"");
#line hidden
testRunner.CollectScenarioErrors();
}
diff --git a/src/Orchard.Specs/Hosting/RequestExtensions.cs b/src/Orchard.Specs/Hosting/RequestExtensions.cs
index dc7271b83..014679cc1 100644
--- a/src/Orchard.Specs/Hosting/RequestExtensions.cs
+++ b/src/Orchard.Specs/Hosting/RequestExtensions.cs
@@ -112,14 +112,19 @@ namespace Orchard.Specs.Hosting {
}
public override void SendKnownResponseHeader(int index, string value) {
- if (index == HeaderSetCookie) {
- _details.ResponseHeaders.Add("Set-Cookie", value);
- }
- else if (index == HeaderLocation) {
- _details.ResponseHeaders.Add("Location", value);
- }
- else {
- _details.ResponseHeaders.Add("known header #" + index, value);
+ switch (index) {
+ case HeaderSetCookie:
+ _details.ResponseHeaders.Add("Set-Cookie", value);
+ break;
+ case HeaderLocation:
+ _details.ResponseHeaders.Add("Location", value);
+ break;
+ case HeaderContentType:
+ _details.ResponseHeaders.Add("Content-Type", value);
+ break;
+ default:
+ _details.ResponseHeaders.Add("known header #" + index, value);
+ break;
}
base.SendKnownResponseHeader(index, value);
}
diff --git a/src/Orchard.Specs/Pages.feature b/src/Orchard.Specs/Pages.feature
index ae39e4666..1b7ad2b41 100644
--- a/src/Orchard.Specs/Pages.feature
+++ b/src/Orchard.Specs/Pages.feature
@@ -1,4 +1,4 @@
-Feature: Content Page management
+Feature: Pages
In order to add content pages to my site
As an author
I want to create, publish and edit pages
diff --git a/src/Orchard.Specs/Pages.feature.cs b/src/Orchard.Specs/Pages.feature.cs
index 2e52026de..fc45a8733 100644
--- a/src/Orchard.Specs/Pages.feature.cs
+++ b/src/Orchard.Specs/Pages.feature.cs
@@ -17,8 +17,8 @@ namespace Orchard.Specs
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.4.0.0")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()]
- [NUnit.Framework.DescriptionAttribute("Content Page management")]
- public partial class ContentPageManagementFeature
+ [NUnit.Framework.DescriptionAttribute("Pages")]
+ public partial class PagesFeature
{
private static TechTalk.SpecFlow.ITestRunner testRunner;
@@ -30,7 +30,7 @@ namespace Orchard.Specs
public virtual void FeatureSetup()
{
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
- TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Content Page management", "In order to add content pages to my site\r\nAs an author\r\nI want to create, publish" +
+ TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Pages", "In order to add content pages to my site\r\nAs an author\r\nI want to create, publish" +
" and edit pages", GenerationTargetLanguage.CSharp, ((string[])(null)));
testRunner.OnFeatureStart(featureInfo);
}