diff --git a/src/Orchard.Specs/Bindings/WebAppHosting.cs b/src/Orchard.Specs/Bindings/WebAppHosting.cs
index 41ff6f62e..2d2222dfc 100644
--- a/src/Orchard.Specs/Bindings/WebAppHosting.cs
+++ b/src/Orchard.Specs/Bindings/WebAppHosting.cs
@@ -31,14 +31,14 @@ namespace Orchard.Specs.Bindings {
[BeforeTestRun]
public static void BeforeTestRun() {
- if ( _orchardTemp.Exists ) {
- _orchardTemp.Delete(true).CreateDirectory();
- }
+ try { _orchardTemp.Delete(true).CreateDirectory(); } catch {}
}
[AfterTestRun]
public static void AfterTestRun() {
- _orchardTemp.Delete(true); // <- try to clear any stragglers on the way out
+ try {
+ _orchardTemp.Delete(true); // <- try to clear any stragglers on the way out
+ } catch {}
}
[AfterScenario]
diff --git a/src/Orchard.Specs/Blogs.feature b/src/Orchard.Specs/Blogs.feature
index 7e3611190..3703b6472 100644
--- a/src/Orchard.Specs/Blogs.feature
+++ b/src/Orchard.Specs/Blogs.feature
@@ -91,4 +91,34 @@ Scenario: I can create a new blog and blog post and when I change the slug of th
Then I should see "
]*>.*?My Blog.*?
"
When I go to "my-other-blog/my-post"
Then I should see "
]*>.*?My Post.*?
"
- And I should see "Hi there."
\ No newline at end of file
+ And I should see "Hi there."
+
+Scenario: When viewing a blog the user agent is given an RSS feed of the blog's posts
+ Given I have installed Orchard
+ When I go to "admin/blogs/create"
+ And I fill in
+ | name | value |
+ | Routable.Title | My Blog |
+ And I hit "Save"
+ And I go to "admin/blogs/my-blog/posts/create"
+ And I fill in
+ | name | value |
+ | Routable.Title | My Post |
+ | Body.Text | Hi there. |
+ And I hit "Publish Now"
+ And I am redirected
+ And I go to "my-blog/my-post"
+ Then I should see ""
+
+
+Scenario: Enabling remote blog publishing inserts the appropriate metaweblogapi markup into the blog's page
+ Given I have installed Orchard
+ And I have enabled "XmlRpc"
+ And I have enabled "Orchard.Blogs.RemotePublishing"
+ When I go to "admin/blogs/create"
+ And I fill in
+ | name | value |
+ | Routable.Title | My Blog |
+ And I hit "Save"
+ And I go to "my-blog"
+ Then I should see ""
diff --git a/src/Orchard.Specs/Blogs.feature.cs b/src/Orchard.Specs/Blogs.feature.cs
index a3953e22d..98ded7f35 100644
--- a/src/Orchard.Specs/Blogs.feature.cs
+++ b/src/Orchard.Specs/Blogs.feature.cs
@@ -294,6 +294,92 @@ this.ScenarioSetup(scenarioInfo);
testRunner.Then("I should see \"
]*>.*?My Post.*?
\"");
#line 94
testRunner.And("I should see \"Hi there.\"");
+#line hidden
+ testRunner.CollectScenarioErrors();
+ }
+
+ [NUnit.Framework.TestAttribute()]
+ [NUnit.Framework.DescriptionAttribute("When viewing a blog the user agent is given an RSS feed of the blog\'s posts")]
+ public virtual void WhenViewingABlogTheUserAgentIsGivenAnRSSFeedOfTheBlogSPosts()
+ {
+ TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("When viewing a blog the user agent is given an RSS feed of the blog\'s posts", ((string[])(null)));
+#line 96
+this.ScenarioSetup(scenarioInfo);
+#line 97
+ testRunner.Given("I have installed Orchard");
+#line 98
+ testRunner.When("I go to \"admin/blogs/create\"");
+#line hidden
+ TechTalk.SpecFlow.Table table10 = new TechTalk.SpecFlow.Table(new string[] {
+ "name",
+ "value"});
+ table10.AddRow(new string[] {
+ "Routable.Title",
+ "My Blog"});
+#line 99
+ testRunner.And("I fill in", ((string)(null)), table10);
+#line 102
+ testRunner.And("I hit \"Save\"");
+#line 103
+ testRunner.And("I go to \"admin/blogs/my-blog/posts/create\"");
+#line hidden
+ TechTalk.SpecFlow.Table table11 = new TechTalk.SpecFlow.Table(new string[] {
+ "name",
+ "value"});
+ table11.AddRow(new string[] {
+ "Routable.Title",
+ "My Post"});
+ table11.AddRow(new string[] {
+ "Body.Text",
+ "Hi there."});
+#line 104
+ testRunner.And("I fill in", ((string)(null)), table11);
+#line 108
+ testRunner.And("I hit \"Publish Now\"");
+#line 109
+ testRunner.And("I am redirected");
+#line 110
+ testRunner.And("I go to \"my-blog/my-post\"");
+#line 111
+ testRunner.Then("I should see \"\"");
+#line hidden
+ testRunner.CollectScenarioErrors();
+ }
+
+ [NUnit.Framework.TestAttribute()]
+ [NUnit.Framework.DescriptionAttribute("Enabling remote blog publishing inserts the appropriate metaweblogapi markup into" +
+ " the blog\'s page")]
+ public virtual void EnablingRemoteBlogPublishingInsertsTheAppropriateMetaweblogapiMarkupIntoTheBlogSPage()
+ {
+ TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Enabling remote blog publishing inserts the appropriate metaweblogapi markup into" +
+ " the blog\'s page", ((string[])(null)));
+#line 114
+this.ScenarioSetup(scenarioInfo);
+#line 115
+ testRunner.Given("I have installed Orchard");
+#line 116
+ testRunner.And("I have enabled \"XmlRpc\"");
+#line 117
+ testRunner.And("I have enabled \"Orchard.Blogs.RemotePublishing\"");
+#line 118
+ testRunner.When("I go to \"admin/blogs/create\"");
+#line hidden
+ TechTalk.SpecFlow.Table table12 = new TechTalk.SpecFlow.Table(new string[] {
+ "name",
+ "value"});
+ table12.AddRow(new string[] {
+ "Routable.Title",
+ "My Blog"});
+#line 119
+ testRunner.And("I fill in", ((string)(null)), table12);
+#line 122
+ testRunner.And("I hit \"Save\"");
+#line 123
+ testRunner.And("I go to \"my-blog\"");
+#line 124
+ testRunner.Then("I should see \"\"");
#line hidden
testRunner.CollectScenarioErrors();
}
diff --git a/src/Orchard.Specs/Hosting/WebHost.cs b/src/Orchard.Specs/Hosting/WebHost.cs
index d2158b64b..38e2a97ab 100644
--- a/src/Orchard.Specs/Hosting/WebHost.cs
+++ b/src/Orchard.Specs/Hosting/WebHost.cs
@@ -18,17 +18,16 @@ namespace Orchard.Specs.Hosting {
}
void WebHostCleanup(object sender, EventArgs e) {
- _tempSite.Delete(true); // <- try to clean up after the appdomain unloads (still not guaranteed to get everything - probably overkill - might go away)
+ try {
+ _tempSite.Delete(true); // <- try to clean up after the appdomain unloads (still not guaranteed to get everything - probably overkill - might go away)
+ } catch{}
}
public void Initialize(string templateName, string virtualDirectory) {
var baseDir = Path.Get(AppDomain.CurrentDomain.BaseDirectory);
_tempSite = Path.Get(_orchardTemp).Combine(System.IO.Path.GetRandomFileName());
- if(_tempSite.Exists) {
- _tempSite.Delete();
- }
-
+ try { _tempSite.Delete(); } catch {}
_tempSite.CreateDirectory();
// Trying the two known relative paths to the Orchard.Web directory.
diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/RemoteBlogPublishingDriver.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/RemoteBlogPublishingDriver.cs
index 86eb6684f..4d1fc58c6 100644
--- a/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/RemoteBlogPublishingDriver.cs
+++ b/src/Orchard.Web/Modules/Orchard.Blogs/Drivers/RemoteBlogPublishingDriver.cs
@@ -1,7 +1,5 @@
using JetBrains.Annotations;
using Orchard.Blogs.Models;
-using Orchard.ContentManagement;
-using Orchard.ContentManagement.Aspects;
using Orchard.ContentManagement.Drivers;
using Orchard.Environment.Extensions;
@@ -10,7 +8,7 @@ namespace Orchard.Blogs.Drivers {
[OrchardFeature("Orchard.Blogs.RemotePublishing")]
public class RemoteBlogPublishingDriver : ContentPartDriver {
protected override DriverResult Display(BlogPart part, string displayType, dynamic shapeHelper) {
- return ContentShape("Parts_Blogs_RemotePublishing", shape => shape.Path(part.As().Path));
+ return ContentShape("Parts_Blogs_RemotePublishing", shape => shape.Blog(part));
}
}
}
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.RemotePublishing.cshtml b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.RemotePublishing.cshtml
index 576f2bb0f..35f3fb802 100644
--- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.RemotePublishing.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts/Blogs.RemotePublishing.cshtml
@@ -2,7 +2,7 @@
@using Orchard.Blogs.Models;
@using Orchard.UI.Resources;
@{
- BlogPart blog = Model;
+ BlogPart blog = Model.Blog;
RegisterLink(new LinkEntry { Rel = "wlwmanifest", Type = "application/wlwmanifest+xml", Href = Url.BlogLiveWriterManifest(blog) });
RegisterLink(new LinkEntry { Rel = "EditURI", Type = "application/rsd+xml", Title = "RSD", Href = Url.BlogRsd(blog) });
}
\ No newline at end of file