diff --git a/src/Orchard.Specs/Bindings/WebAppHosting.cs b/src/Orchard.Specs/Bindings/WebAppHosting.cs index 73ab0f9b5..4f32a979c 100644 --- a/src/Orchard.Specs/Bindings/WebAppHosting.cs +++ b/src/Orchard.Specs/Bindings/WebAppHosting.cs @@ -213,7 +213,7 @@ namespace Orchard.Specs.Bindings { } } - [Then(@"the status should be (.*) (.*)")] + [Then(@"the status should be (.*) ""(.*)""")] public void ThenTheStatusShouldBe(int statusCode, string statusDescription) { Assert.That(Details.StatusCode, Is.EqualTo(statusCode)); Assert.That(Details.StatusDescription, Is.EqualTo(statusDescription)); diff --git a/src/Orchard.Specs/Media.feature b/src/Orchard.Specs/Media.feature index 6698070ec..24e904cea 100644 --- a/src/Orchard.Specs/Media.feature +++ b/src/Orchard.Specs/Media.feature @@ -8,7 +8,7 @@ Scenario: Media admin is available And I have installed "Orchard.Media" When I go to "admin/media" Then I should see "Manage Media Folders" - And the status should be 200 OK + And the status should be 200 "OK" Scenario: Creating a folder Given I have installed Orchard @@ -21,4 +21,4 @@ Scenario: Creating a folder And I am redirected Then I should see "Manage Media Folders" And I should see "Hello World" - And the status should be 200 OK + And the status should be 200 "OK" diff --git a/src/Orchard.Specs/Media.feature.cs b/src/Orchard.Specs/Media.feature.cs index 558a9fb55..bb2ceeb63 100644 --- a/src/Orchard.Specs/Media.feature.cs +++ b/src/Orchard.Specs/Media.feature.cs @@ -69,7 +69,7 @@ testRunner.When("I go to \"admin/media\""); #line 10 testRunner.Then("I should see \"Manage Media Folders\""); #line 11 -testRunner.And("the status should be 200 OK"); +testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -105,7 +105,7 @@ testRunner.Then("I should see \"Manage Media Folders\""); #line 23 testRunner.And("I should see \"Hello World\""); #line 24 -testRunner.And("the status should be 200 OK"); +testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } diff --git a/src/Orchard.Specs/Modules.feature b/src/Orchard.Specs/Modules.feature index e6285adef..dd68a89c2 100644 --- a/src/Orchard.Specs/Modules.feature +++ b/src/Orchard.Specs/Modules.feature @@ -8,11 +8,11 @@ Scenario: Installed modules are listed When I go to "admin/modules" Then I should see "

Installed Modules

" And I should see "

Themes" - And the status should be 200 OK + And the status should be 200 "OK" Scenario: Features of installed modules are listed Given I have installed Orchard When I go to "admin/modules/features" Then I should see "

Manage Features

" And I should see "

Common

" - And the status should be 200 OK \ No newline at end of file + And the status should be 200 "OK" \ No newline at end of file diff --git a/src/Orchard.Specs/Modules.feature.cs b/src/Orchard.Specs/Modules.feature.cs index 9d2bc31a7..bf9a90a5a 100644 --- a/src/Orchard.Specs/Modules.feature.cs +++ b/src/Orchard.Specs/Modules.feature.cs @@ -69,7 +69,7 @@ testRunner.Then("I should see \"

Installed Modules

\""); #line 10 testRunner.And("I should see \"

Themes\""); #line 11 -testRunner.And("the status should be 200 OK"); +testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -90,7 +90,7 @@ testRunner.Then("I should see \"

Manage Features

\""); #line 17 testRunner.And("I should see \"

Common

\""); #line 18 -testRunner.And("the status should be 200 OK"); +testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } diff --git a/src/Orchard.Specs/MultiTenancy.feature b/src/Orchard.Specs/MultiTenancy.feature index 9e3c76273..f8b80e41c 100644 --- a/src/Orchard.Specs/MultiTenancy.feature +++ b/src/Orchard.Specs/MultiTenancy.feature @@ -9,7 +9,7 @@ Scenario: Default site is listed When I go to "Admin/MultiTenancy" Then I should see "List of Site's Tenants" And I should see "

Default

" - And the status should be 200 OK + And the status should be 200 "OK" Scenario: New tenant fields are required Given I have installed Orchard @@ -28,7 +28,7 @@ Scenario: A new tenant is created And I hit "Save" And I am redirected Then I should see "

Scott

" - And the status should be 200 OK + And the status should be 200 "OK" Scenario: A new tenant is created with uninitialized state Given I have installed Orchard @@ -40,7 +40,7 @@ Scenario: A new tenant is created with uninitialized state And I hit "Save" And I am redirected Then I should see "
  • " - And the status should be 200 OK + And the status should be 200 "OK" Scenario: A new tenant goes to the setup screen Given I have installed Orchard @@ -54,7 +54,7 @@ Scenario: A new tenant goes to the setup screen And I go to "/Setup" on host scott.example.org Then I should see "Welcome to Orchard" And I should see "Finish Setup" - And the status should be 200 OK + And the status should be 200 "OK" Scenario: A new tenant with preconfigured database goes to the setup screen Given I have installed Orchard @@ -71,7 +71,7 @@ Scenario: A new tenant with preconfigured database goes to the setup screen Then I should see "Welcome to Orchard" And I should see "Finish Setup" And I should not see "SQL Server Compact" - And the status should be 200 OK + And the status should be 200 "OK" Scenario: A new tenant runs the setup Given I have installed Orchard diff --git a/src/Orchard.Specs/MultiTenancy.feature.cs b/src/Orchard.Specs/MultiTenancy.feature.cs index f558dab40..8c653f8d8 100644 --- a/src/Orchard.Specs/MultiTenancy.feature.cs +++ b/src/Orchard.Specs/MultiTenancy.feature.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------ // // This code was generated by SpecFlow (http://www.specflow.org/). -// SpecFlow Version:1.3.0.0 +// SpecFlow Version:1.3.2.0 // Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if @@ -14,7 +14,7 @@ namespace Orchard.Specs using TechTalk.SpecFlow; - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.3.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.3.2.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("Multiple tenant management")] @@ -71,7 +71,7 @@ testRunner.Then("I should see \"List of Site's Tenants\""); #line 11 testRunner.And("I should see \"

    Default

    \""); #line 12 -testRunner.And("the status should be 200 OK"); +testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -126,7 +126,7 @@ testRunner.And("I am redirected"); #line 30 testRunner.Then("I should see \"

    Scott

    \""); #line 31 -testRunner.And("the status should be 200 OK"); +testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -160,7 +160,7 @@ testRunner.And("I am redirected"); #line 42 testRunner.Then("I should see \"
  • \""); #line 43 -testRunner.And("the status should be 200 OK"); +testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -199,7 +199,7 @@ testRunner.Then("I should see \"Welcome to Orchard\""); #line 56 testRunner.And("I should see \"Finish Setup\""); #line 57 -testRunner.And("the status should be 200 OK"); +testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -245,7 +245,7 @@ testRunner.And("I should see \"Finish Setup\""); #line 73 testRunner.And("I should not see \"SQL Server Compact\""); #line 74 -testRunner.And("the status should be 200 OK"); +testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } diff --git a/src/Orchard.Specs/Setup.feature b/src/Orchard.Specs/Setup.feature index 81a679fa0..e466e20c7 100644 --- a/src/Orchard.Specs/Setup.feature +++ b/src/Orchard.Specs/Setup.feature @@ -12,7 +12,7 @@ Scenario: Root request shows setup form When I go to "/Default.aspx" Then I should see "Welcome to Orchard" And I should see "Finish Setup" - And the status should be 200 OK + And the status should be 200 "OK" Scenario: Setup folder also shows setup form Given I have a clean site with @@ -23,7 +23,7 @@ Scenario: Setup folder also shows setup form When I go to "/Setup" Then I should see "Welcome to Orchard" And I should see "Finish Setup" - And the status should be 200 OK + And the status should be 200 "OK" Scenario: Some of the initial form values are required Given I have a clean site with diff --git a/src/Orchard.Specs/Setup.feature.cs b/src/Orchard.Specs/Setup.feature.cs index 6627d193e..323c175f7 100644 --- a/src/Orchard.Specs/Setup.feature.cs +++ b/src/Orchard.Specs/Setup.feature.cs @@ -84,7 +84,7 @@ testRunner.Then("I should see \"Welcome to Orchard\""); #line 14 testRunner.And("I should see \"Finish Setup\""); #line 15 -testRunner.And("the status should be 200 OK"); +testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -120,7 +120,7 @@ testRunner.Then("I should see \"Welcome to Orchard\""); #line 25 testRunner.And("I should see \"Finish Setup\""); #line 26 -testRunner.And("the status should be 200 OK"); +testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } diff --git a/src/Orchard.Specs/WebHosting.feature b/src/Orchard.Specs/WebHosting.feature index 223ba15cb..90d7ecb7a 100644 --- a/src/Orchard.Specs/WebHosting.feature +++ b/src/Orchard.Specs/WebHosting.feature @@ -7,25 +7,25 @@ Scenario: Returning static files Given I have a clean site based on Simple.Web When I go to "Content/Static.txt" Then I should see "Hello world!" - And the status should be 200 OK + And the status should be 200 "OK" Scenario: Returning web forms page Given I have a clean site based on Simple.Web When I go to "Simple/Page.aspx" Then I should see "Hello again" - And the status should be 200 OK + And the status should be 200 "OK" Scenario: Returning a routed request Given I have a clean site based on Simple.Web When I go to "hello-world" - Then the status should be 200 OK + Then the status should be 200 "OK" And I should see "Hello yet again" Scenario: Following a link Given I have a clean site based on Simple.Web When I go to "/simple/page.aspx" And I follow "next page" - Then the status should be 200 OK + Then the status should be 200 "OK" And I should see "Hello yet again" Scenario: Submitting a form with input, default, and hidden fields @@ -50,3 +50,13 @@ Scenario: Being redirected When I go to "/simple/redir.aspx" And I am redirected Then I should see "Hello again" + +Scenario: Not found modules file + Given I have a clean site based on Simple.Web + When I go to "/Modules/Orchard.Blogs/module.txt" + Then the status should be 404 "Not Found" + +Scenario: Not found themes file + Given I have a clean site based on Simple.Web + When I go to "/Themes/Classic/theme.txt" + Then the status should be 404 "Not Found" \ No newline at end of file diff --git a/src/Orchard.Specs/WebHosting.feature.cs b/src/Orchard.Specs/WebHosting.feature.cs index c41fb311e..2f1c2e07b 100644 --- a/src/Orchard.Specs/WebHosting.feature.cs +++ b/src/Orchard.Specs/WebHosting.feature.cs @@ -67,7 +67,7 @@ testRunner.When("I go to \"Content/Static.txt\""); #line 9 testRunner.Then("I should see \"Hello world!\""); #line 10 -testRunner.And("the status should be 200 OK"); +testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -86,7 +86,7 @@ testRunner.When("I go to \"Simple/Page.aspx\""); #line 15 testRunner.Then("I should see \"Hello again\""); #line 16 -testRunner.And("the status should be 200 OK"); +testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -103,7 +103,7 @@ testRunner.Given("I have a clean site based on Simple.Web"); #line 20 testRunner.When("I go to \"hello-world\""); #line 21 -testRunner.Then("the status should be 200 OK"); +testRunner.Then("the status should be 200 \"OK\""); #line 22 testRunner.And("I should see \"Hello yet again\""); #line hidden @@ -124,7 +124,7 @@ testRunner.When("I go to \"/simple/page.aspx\""); #line 27 testRunner.And("I follow \"next page\""); #line 28 -testRunner.Then("the status should be 200 OK"); +testRunner.Then("the status should be 200 \"OK\""); #line 29 testRunner.And("I should see \"Hello yet again\""); #line hidden @@ -197,6 +197,40 @@ testRunner.When("I go to \"/simple/redir.aspx\""); testRunner.And("I am redirected"); #line 52 testRunner.Then("I should see \"Hello again\""); +#line hidden + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Not found modules file")] + public virtual void NotFoundModulesFile() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not found modules file", ((string[])(null))); +#line 54 +this.ScenarioSetup(scenarioInfo); +#line 55 +testRunner.Given("I have a clean site based on Simple.Web"); +#line 56 +testRunner.When("I go to \"/Modules/Orchard.Blogs/module.txt\""); +#line 57 +testRunner.Then("the status should be 404 \"Not Found\""); +#line hidden + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Not found themes file")] + public virtual void NotFoundThemesFile() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not found themes file", ((string[])(null))); +#line 59 +this.ScenarioSetup(scenarioInfo); +#line 60 +testRunner.Given("I have a clean site based on Simple.Web"); +#line 61 +testRunner.When("I go to \"/Themes/Classic/theme.txt\""); +#line 62 +testRunner.Then("the status should be 404 \"Not Found\""); #line hidden testRunner.CollectScenarioErrors(); } diff --git a/src/Orchard.Web/Web.config b/src/Orchard.Web/Web.config index dc8eb4045..8050ee9f1 100644 --- a/src/Orchard.Web/Web.config +++ b/src/Orchard.Web/Web.config @@ -108,6 +108,10 @@ + + + + @@ -152,6 +156,10 @@ + + + +