Adds transactional outbox and email verification
Implements outbox pattern for reliable message delivery Adds email verification flow with Postmark integration Enhances account registration with secure token generation Introduces background processing for asynchronous email sending Implements database-level notification mechanism for message processing
This commit is contained in:
parent
88812177a9
commit
54b057886c
35 changed files with 1174 additions and 358 deletions
|
|
@ -12,21 +12,23 @@ public partial class EmailConfirmationSpecs : FeatureFixtures.EmailConfirmationS
|
|||
public async Task Confirm_valid_email_address()
|
||||
{
|
||||
await Runner.RunScenarioAsync(
|
||||
_ => Given_an_account_exists_with_unconfirmed_email("test@example.com"),
|
||||
_ => When_I_click_the_valid_confirmation_link_for("test@example.com"),
|
||||
_ => Then_the_accounts_email_confirmed_should_be_true(),
|
||||
_ => And_I_should_be_redirected_to_the_welcome_page()
|
||||
_ => Given_an_account_exists_with_unconfirmed_email($"test-{Guid.NewGuid():N}@example.com"),
|
||||
_ => And_a_verification_email_is_queued_in_outbox(),
|
||||
_ => And_the_outbox_message_is_processed(),
|
||||
_ => When_I_confirm_email_with_valid_token(),
|
||||
_ => Then_the_accounts_email_should_be_confirmed()
|
||||
);
|
||||
}
|
||||
|
||||
[Scenario]
|
||||
[TestMethod]
|
||||
public async Task Handle_invalid_confirmation_link()
|
||||
public async Task Handle_invalid_confirmation_token()
|
||||
{
|
||||
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()
|
||||
_ => Given_an_account_exists_with_unconfirmed_email($"test-{Guid.NewGuid():N}@example.com"),
|
||||
_ => When_I_confirm_email_with_invalid_token(),
|
||||
_ => Then_I_should_see_an_error_message("Invalid"),
|
||||
_ => And_the_email_remains_unconfirmed()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue