mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-01-23 13:22:08 +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 hit "Suspend"
|
||||
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
|
||||
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 hit "Resume"
|
||||
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
|
||||
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"
|
||||
When I execute >tenant list
|
||||
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
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#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
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
@@ -587,7 +587,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
#line 193
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#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
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
@@ -610,7 +610,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
#line 201
|
||||
testRunner.Then("I should see \"Name: Alpha\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#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
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
|
||||
@@ -88,11 +88,12 @@ namespace Orchard.MultiTenancy.Controllers {
|
||||
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");
|
||||
}
|
||||
catch (ArgumentException ex) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<li class="tenant @tenant.State">
|
||||
<div class="summary">
|
||||
<div class="properties">
|
||||
<h3>
|
||||
@tenant.Name @if (!string.IsNullOrEmpty(tenant.RequestUrlHost)) {
|
||||
<h3>@tenant.Name
|
||||
@if (!String.IsNullOrEmpty(tenant.RequestUrlHost)) {
|
||||
var tenantClone = new ShellSettings(tenant);
|
||||
foreach (var t in tenant.RequestUrlHost.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) {
|
||||
tenantClone.RequestUrlHost = t;
|
||||
|
||||
Reference in New Issue
Block a user