mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Fixed MultiTenancy feature specflow tests.
This commit is contained in:
@@ -168,7 +168,7 @@ Scenario: A running tenant can be disabled
|
|||||||
And I go to "/Admin/MultiTenancy" on host localhost
|
And I go to "/Admin/MultiTenancy" on host localhost
|
||||||
And I hit "Suspend"
|
And I hit "Suspend"
|
||||||
And I am redirected
|
And I am redirected
|
||||||
Then I should see "<form action="/Admin/MultiTenancy/enable""
|
Then I should see "<form action="/Admin/MultiTenancy/Enable""
|
||||||
|
|
||||||
Scenario: A running tenant which is disabled can be enabled
|
Scenario: A running tenant which is disabled can be enabled
|
||||||
Given I have installed Orchard
|
Given I have installed Orchard
|
||||||
@@ -191,7 +191,7 @@ Scenario: A running tenant which is disabled can be enabled
|
|||||||
And I am redirected
|
And I am redirected
|
||||||
And I hit "Resume"
|
And I hit "Resume"
|
||||||
And I am redirected
|
And I am redirected
|
||||||
Then I should see "<form action="/Admin/MultiTenancy/disable""
|
Then I should see "<form action="/Admin/MultiTenancy/Disable""
|
||||||
|
|
||||||
Scenario: Listing tenants from command line
|
Scenario: Listing tenants from command line
|
||||||
Given I have installed Orchard
|
Given I have installed Orchard
|
||||||
@@ -199,4 +199,4 @@ Scenario: Listing tenants from command line
|
|||||||
And I have tenant "Alpha" on "example.org" as "New-site-name"
|
And I have tenant "Alpha" on "example.org" as "New-site-name"
|
||||||
When I execute >tenant list
|
When I execute >tenant list
|
||||||
Then I should see "Name: Alpha"
|
Then I should see "Name: Alpha"
|
||||||
And I should see "Request Url Host: example.org"
|
And I should see "Request URL host: example.org"
|
||||||
6
src/Orchard.Specs/MultiTenancy.feature.cs
generated
6
src/Orchard.Specs/MultiTenancy.feature.cs
generated
@@ -525,7 +525,7 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
#line 170
|
#line 170
|
||||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||||
#line 171
|
#line 171
|
||||||
testRunner.Then("I should see \"<form action=\"/Admin/MultiTenancy/enable\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
testRunner.Then("I should see \"<form action=\"/Admin/MultiTenancy/Enable\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||||
#line hidden
|
#line hidden
|
||||||
this.ScenarioCleanup();
|
this.ScenarioCleanup();
|
||||||
}
|
}
|
||||||
@@ -587,7 +587,7 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
#line 193
|
#line 193
|
||||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||||
#line 194
|
#line 194
|
||||||
testRunner.Then("I should see \"<form action=\"/Admin/MultiTenancy/disable\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
testRunner.Then("I should see \"<form action=\"/Admin/MultiTenancy/Disable\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||||
#line hidden
|
#line hidden
|
||||||
this.ScenarioCleanup();
|
this.ScenarioCleanup();
|
||||||
}
|
}
|
||||||
@@ -610,7 +610,7 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
#line 201
|
#line 201
|
||||||
testRunner.Then("I should see \"Name: Alpha\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
testRunner.Then("I should see \"Name: Alpha\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||||
#line 202
|
#line 202
|
||||||
testRunner.And("I should see \"Request Url Host: example.org\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
testRunner.And("I should see \"Request URL host: example.org\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||||
#line hidden
|
#line hidden
|
||||||
this.ScenarioCleanup();
|
this.ScenarioCleanup();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,11 +88,12 @@ namespace Orchard.MultiTenancy.Controllers {
|
|||||||
Modules = viewModel.Modules.Where(x => x.Checked).Select(x => x.ModuleId).ToArray()
|
Modules = viewModel.Modules.Where(x => x.Checked).Select(x => x.ModuleId).ToArray()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Services.Notifier.Information(T("Tenant '{0}' was created successfully.", viewModel.Name));
|
||||||
return RedirectToAction("Index");
|
return RedirectToAction("Index");
|
||||||
}
|
}
|
||||||
catch (ArgumentException ex) {
|
catch (ArgumentException ex) {
|
||||||
Logger.Error(ex, "Error while creating tenant.");
|
Logger.Error(ex, "Error while creating tenant.");
|
||||||
Services.Notifier.Error(T("Tenant creation failed with error: {0}", ex.Message));
|
Services.Notifier.Error(T("Tenant creation failed with error: {0}.", ex.Message));
|
||||||
return View(viewModel);
|
return View(viewModel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
<li class="tenant @tenant.State">
|
<li class="tenant @tenant.State">
|
||||||
<div class="summary">
|
<div class="summary">
|
||||||
<div class="properties">
|
<div class="properties">
|
||||||
<h3>
|
<h3>@tenant.Name
|
||||||
@tenant.Name @if (!string.IsNullOrEmpty(tenant.RequestUrlHost)) {
|
@if (!String.IsNullOrEmpty(tenant.RequestUrlHost)) {
|
||||||
var tenantClone = new ShellSettings(tenant);
|
var tenantClone = new ShellSettings(tenant);
|
||||||
foreach (var t in tenant.RequestUrlHost.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) {
|
foreach (var t in tenant.RequestUrlHost.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) {
|
||||||
tenantClone.RequestUrlHost = t;
|
tenantClone.RequestUrlHost = t;
|
||||||
|
|||||||
Reference in New Issue
Block a user