mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing some spec tests
--HG-- branch : dev
This commit is contained in:
@@ -17,11 +17,12 @@ namespace Orchard.Specs.Bindings {
|
|||||||
public void GivenIHaveInstalledOrchard(string virtualDirectory) {
|
public void GivenIHaveInstalledOrchard(string virtualDirectory) {
|
||||||
var webApp = Binding<WebAppHosting>();
|
var webApp = Binding<WebAppHosting>();
|
||||||
|
|
||||||
webApp.GivenIHaveACleanSiteWith(TableData(
|
webApp.GivenIHaveACleanSiteWith(
|
||||||
|
virtualDirectory,
|
||||||
|
TableData(
|
||||||
new { extension = "module", names = "Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce" },
|
new { extension = "module", names = "Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce" },
|
||||||
new { extension = "core", names = "Common, Dashboard, Feeds, HomePage, Navigation, Contents, Routable, Scheduling, Settings, Shapes, XmlRpc" },
|
new { extension = "core", names = "Common, Dashboard, Feeds, HomePage, Navigation, Contents, Routable, Scheduling, Settings, Shapes, XmlRpc" },
|
||||||
new { extension = "theme", names = "SafeMode, TheAdmin, TheThemeMachine" }),
|
new { extension = "theme", names = "SafeMode, TheAdmin, TheThemeMachine" }));
|
||||||
virtualDirectory);
|
|
||||||
|
|
||||||
webApp.WhenIGoTo("Setup");
|
webApp.WhenIGoTo("Setup");
|
||||||
|
|
||||||
|
@@ -74,7 +74,7 @@ namespace Orchard.Specs.Bindings {
|
|||||||
GivenIHaveACleanSiteBasedOn(siteFolder, "/");
|
GivenIHaveACleanSiteBasedOn(siteFolder, "/");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Given(@"I have a clean site based on (.*) at ""(.*)\""")]
|
[Given(@"I have a clean site based on (.*) at ""(.*)""")]
|
||||||
public void GivenIHaveACleanSiteBasedOn(string siteFolder, string virtualDirectory) {
|
public void GivenIHaveACleanSiteBasedOn(string siteFolder, string virtualDirectory) {
|
||||||
_webHost = new WebHost(_orchardTemp);
|
_webHost = new WebHost(_orchardTemp);
|
||||||
Host.Initialize(siteFolder, virtualDirectory ?? "/");
|
Host.Initialize(siteFolder, virtualDirectory ?? "/");
|
||||||
@@ -129,7 +129,13 @@ namespace Orchard.Specs.Bindings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Given(@"I have a clean site with")]
|
[Given(@"I have a clean site with")]
|
||||||
public void GivenIHaveACleanSiteWith(Table table, string virtualDirectory = "/") {
|
public void GivenIHaveACleanSiteWith(Table table) {
|
||||||
|
GivenIHaveACleanSiteWith("/", table);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[Given(@"I have a clean site at ""(.*)"" with")]
|
||||||
|
public void GivenIHaveACleanSiteWith(string virtualDirectory, Table table) {
|
||||||
GivenIHaveACleanSite(virtualDirectory);
|
GivenIHaveACleanSite(virtualDirectory);
|
||||||
foreach (var row in table.Rows) {
|
foreach (var row in table.Rows) {
|
||||||
foreach (var name in row["names"].Split(',').Select(x => x.Trim())) {
|
foreach (var name in row["names"].Split(',').Select(x => x.Trim())) {
|
||||||
|
Reference in New Issue
Block a user