Various work around the architecture
This commit is contained in:
parent
b1e134490d
commit
71576a4b1f
18 changed files with 522 additions and 358 deletions
31
PlanTempus.X.BDD/Scenarios/EmailConfirmationSpecs.cs
Normal file
31
PlanTempus.X.BDD/Scenarios/EmailConfirmationSpecs.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using LightBDD.Framework;
|
||||
using LightBDD.Framework.Scenarios;
|
||||
using LightBDD.MsTest3;
|
||||
|
||||
namespace PlanTempus.X.BDD.Scenarios;
|
||||
[TestClass]
|
||||
public partial class EmailConfirmationSpecs : FeatureFixtures.EmailConfirmationSpecs
|
||||
{
|
||||
[Scenario]
|
||||
[TestMethod]
|
||||
public async Task Confirm_valid_email_address()
|
||||
{
|
||||
await Runner.RunScenarioAsync(
|
||||
_ => Given_a_user_exists_with_unconfirmed_email("test@example.com"),
|
||||
_ => When_I_click_the_valid_confirmation_link_for("test@example.com"),
|
||||
_ => Then_the_users_email_confirmed_should_be_true(),
|
||||
_ => And_I_should_be_redirected_to_the_welcome_page()
|
||||
);
|
||||
}
|
||||
|
||||
[Scenario]
|
||||
[TestMethod]
|
||||
public async Task Handle_invalid_confirmation_link()
|
||||
{
|
||||
await Runner.RunScenarioAsync(
|
||||
_ => When_I_click_an_invalid_confirmation_link(),
|
||||
_ => Then_I_should_see_an_error_message("Invalid confirmation link"),
|
||||
_ => And_my_email_remains_unconfirmed()
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue