27 lines
956 B
PHP
27 lines
956 B
PHP
<?php
|
|
|
|
use App\Models\Mailbox;
|
|
use App\Services\Mail\MailPurpose;
|
|
use App\Services\Secrets\SecretVault;
|
|
use App\Support\Settings;
|
|
|
|
it('seeds the five mailboxes so the page shows what is expected', function () {
|
|
expect(Mailbox::query()->pluck('key')->sort()->values()->all())
|
|
->toBe(['billing', 'info', 'no-reply', 'office', 'support']);
|
|
});
|
|
|
|
it('marks no-reply as unanswerable and the rest as answerable', function () {
|
|
expect(Mailbox::findByKey('no-reply')->no_reply)->toBeTrue()
|
|
->and(Mailbox::findByKey('support')->no_reply)->toBeFalse();
|
|
});
|
|
|
|
it('points every purpose at a mailbox, so nothing sends from nowhere', function () {
|
|
foreach (MailPurpose::ALL as $purpose) {
|
|
expect(Settings::get(MailPurpose::settingKey($purpose)))->not->toBeNull();
|
|
}
|
|
});
|
|
|
|
it('no longer offers mail.password as a secret, because it is superseded', function () {
|
|
expect(SecretVault::REGISTRY)->not->toHaveKey('mail.password');
|
|
});
|