fix(queue): add explicit tries and timeout to SendClientSecurityAlertMail (F-2026-0007)
This commit is contained in:
parent
9a0328d884
commit
a4cc75d697
2 changed files with 14 additions and 0 deletions
|
|
@ -21,6 +21,10 @@ final class SendClientSecurityAlertMail implements ShouldQueue
|
|||
use InteractsWithQueue;
|
||||
use Queueable;
|
||||
|
||||
public int $tries = 3;
|
||||
|
||||
public int $timeout = 30;
|
||||
|
||||
public function __construct(
|
||||
private readonly Mailer $mailer,
|
||||
private readonly SecurityAlertMailConfig $config,
|
||||
|
|
|
|||
|
|
@ -25,6 +25,16 @@ describe('SendClientSecurityAlertMail Listener Unit Tests', function (): void {
|
|||
Mail::fake();
|
||||
});
|
||||
|
||||
it('has explicit tries and timeout configuration', function (): void {
|
||||
// GIVEN
|
||||
$config = new SecurityAlertMailConfig(new Email('security@example.com'));
|
||||
$listener = new SendClientSecurityAlertMail(Mail::mailer(), $config);
|
||||
|
||||
// THEN
|
||||
expect($listener->tries)->toBe(3)
|
||||
->and($listener->timeout)->toBe(30);
|
||||
});
|
||||
|
||||
it('sends email alert when ClientSecretGenerated is handled', function (): void {
|
||||
// GIVEN
|
||||
$clientId = new ClientId(Uuid::uuid7());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue