toContain('Publisher · Hub') ->toContain('presseecho') ->toContain('businessportal24') ->toContain('ist der gemeinsame Publisher') ->toContain('#1A2540') ->toContain('#B07A3A'); } test('the magic login link mail uses the hub ci layout', function () { $user = User::factory()->make(); assertHubEmailBranding((new MagicLoginLink($user, 'https://pressekonto.test/magic-login/abc', '12.07.2026 10:00'))->render()); }); test('the go-live password reset mail uses the hub ci layout', function () { $user = User::factory()->make(); assertHubEmailBranding((new GoLivePasswordReset($user, 'https://pressekonto.test/reset-password/abc'))->render()); }); test('the press release published and rejected mails use the hub ci layout', function () { $pressRelease = PressRelease::factory()->published()->create(); $user = $pressRelease->user; assertHubEmailBranding((new PressReleasePublished($user, $pressRelease))->render()); assertHubEmailBranding((new PressReleaseRejected($user, $pressRelease, 'Bitte Quellen ergänzen.'))->render()); }); test('the termination mails use the hub ci layout', function () { $terminationRequest = TerminationRequest::factory()->create(); assertHubEmailBranding((new TerminationRequestReceived($terminationRequest))->render()); assertHubEmailBranding((new TerminationRequestSubmitted($terminationRequest))->render()); }); test('the withdrawal mails use the hub ci layout', function () { $withdrawalRequest = WithdrawalRequest::factory()->create(); assertHubEmailBranding((new WithdrawalRequestReceived($withdrawalRequest))->render()); assertHubEmailBranding((new WithdrawalRequestSubmitted($withdrawalRequest))->render()); }); test('the contact request mail uses the hub ci layout', function () { assertHubEmailBranding( (new ContactRequestSubmitted('Paula Presse', 'paula@example.test', 'Eine Frage zur Plattform.', 'pressekonto.test'))->render() ); }); test('the password reset notification renders in the hub ci layout', function () { $user = User::factory()->create(); $mailMessage = (new ResetPassword('test-token'))->toMail($user); expect($mailMessage->subject)->toBe('Passwort zurücksetzen für Ihr pressekonto'); $html = (string) $mailMessage->render(); assertHubEmailBranding($html); expect($html)->toContain('/reset-password/test-token'); }); test('the email verification notification renders in the hub ci layout', function () { $user = User::factory()->unverified()->create(); $mailMessage = (new VerifyEmail)->toMail($user); expect($mailMessage->subject)->toBe('E-Mail-Adresse bestätigen für Ihr pressekonto'); $html = (string) $mailMessage->render(); assertHubEmailBranding($html); expect($html)->toContain('/verify-email/'); });