--HG--
branch : 1.x
This commit is contained in:
Andre Rodrigues
2011-01-06 16:25:59 -08:00
2 changed files with 36 additions and 33 deletions

View File

@@ -15,7 +15,8 @@ Scenario: Login can be automated
| password | qwerty123! |
And I hit "Sign In"
And I am redirected
Then I should see "Welcome, <strong>bob</strong>!"
Then I should see "Welcome"
And I should see "bob"
@security
Scenario: Anonymous user can see the home page but not the dashboard

View File

@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by SpecFlow (http://www.specflow.org/).
// SpecFlow Version:1.4.0.0
// SpecFlow Version:1.5.0.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.4.0.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.5.0.0")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()]
[NUnit.Framework.DescriptionAttribute("Addition")]
@@ -30,8 +30,8 @@ namespace Orchard.Specs
public virtual void FeatureSetup()
{
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Addition", "In order to prevent security model regressions\nAs a user with specific permission" +
"s\nI should to be granted or denied access to various actions", GenerationTargetLanguage.CSharp, ((string[])(null)));
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Addition", "In order to prevent security model regressions\r\nAs a user with specific permissio" +
"ns\r\nI should to be granted or denied access to various actions", GenerationTargetLanguage.CSharp, ((string[])(null)));
testRunner.OnFeatureStart(featureInfo);
}
@@ -87,7 +87,9 @@ this.ScenarioSetup(scenarioInfo);
#line 17
testRunner.And("I am redirected");
#line 18
testRunner.Then("I should see \"Welcome, <strong>bob</strong>!\"");
testRunner.Then("I should see \"Welcome\"");
#line 19
testRunner.And("I should see \"bob\"");
#line hidden
testRunner.CollectScenarioErrors();
}
@@ -99,17 +101,17 @@ this.ScenarioSetup(scenarioInfo);
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Anonymous user can see the home page but not the dashboard", new string[] {
"security"});
#line 21
this.ScenarioSetup(scenarioInfo);
#line 22
testRunner.Given("I have installed Orchard");
this.ScenarioSetup(scenarioInfo);
#line 23
testRunner.And("I have a user \"bob\" with permissions \"AccessFrontEnd\"");
testRunner.Given("I have installed Orchard");
#line 24
testRunner.When("I sign in as \"bob\"");
testRunner.And("I have a user \"bob\" with permissions \"AccessFrontEnd\"");
#line 25
testRunner.Then("I should see \"this is the homepage of your new site\" when I go to \"/\"");
testRunner.When("I sign in as \"bob\"");
#line 26
testRunner.Then("I should see \"this is the homepage of your new site\" when I go to \"/\"");
#line 27
testRunner.And("I should be denied access when I go to \"admin\"");
#line hidden
testRunner.CollectScenarioErrors();