mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-06 00:24:02 +00:00
Use withtenantDatabases where needed
This commit is contained in:
parent
cda2a57fb0
commit
23b028da36
5 changed files with 31 additions and 11 deletions
|
|
@ -27,6 +27,8 @@ function assertMailerTransportUsesPassword(string|null $password) {
|
|||
};
|
||||
|
||||
test('mailer transport uses the correct credentials', function() {
|
||||
withTenantDatabases();
|
||||
|
||||
config(['mail.default' => 'smtp', 'mail.mailers.smtp.password' => $defaultPassword = 'DEFAULT']);
|
||||
MailTenancyBootstrapper::$credentialsMap = ['mail.mailers.smtp.password' => 'smtp_password'];
|
||||
|
||||
|
|
@ -52,6 +54,8 @@ test('mailer transport uses the correct credentials', function() {
|
|||
|
||||
|
||||
test('initializing and ending tenancy binds a fresh MailManager instance without cached mailers', function() {
|
||||
withTenantDatabases();
|
||||
|
||||
$mailers = fn() => invade(app(MailManager::class))->mailers;
|
||||
|
||||
app(MailManager::class)->mailer('smtp');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue