Add module.txt & theme.txt handler mapping to NotFoundHandler in global web.config.

--HG--
branch : dev
This commit is contained in:
Andre Rodrigues
2010-09-27 13:09:17 -07:00
parent 72e4d8d93e
commit 10407a069c
12 changed files with 85 additions and 33 deletions

View File

@@ -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));

View File

@@ -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"

View File

@@ -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();
}

View File

@@ -8,11 +8,11 @@ Scenario: Installed modules are listed
When I go to "admin/modules"
Then I should see "<h1>Installed Modules</h1>"
And I should see "<h2>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 "<h1>Manage Features</h1>"
And I should see "<h3>Common</h3>"
And the status should be 200 OK
And the status should be 200 "OK"

View File

@@ -69,7 +69,7 @@ testRunner.Then("I should see \"<h1>Installed Modules</h1>\"");
#line 10
testRunner.And("I should see \"<h2>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 \"<h1>Manage Features</h1>\"");
#line 17
testRunner.And("I should see \"<h3>Common</h3>\"");
#line 18
testRunner.And("the status should be 200 OK");
testRunner.And("the status should be 200 \"OK\"");
#line hidden
testRunner.CollectScenarioErrors();
}

View File

@@ -9,7 +9,7 @@ Scenario: Default site is listed
When I go to "Admin/MultiTenancy"
Then I should see "List of Site&#39;s Tenants"
And I should see "<h3>Default</h3>"
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 "<h3>Scott</h3>"
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 "<li class="tenant Uninitialized">"
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

View File

@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// 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&#39;s Tenants\"");
#line 11
testRunner.And("I should see \"<h3>Default</h3>\"");
#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 \"<h3>Scott</h3>\"");
#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 \"<li class=\"tenant Uninitialized\">\"");
#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();
}

View File

@@ -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

View File

@@ -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();
}

View File

@@ -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"

View File

@@ -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();
}