1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-05-06 18:04:03 +00:00

Fix DB bootstrapper test

"database tenancy bootstrapper throws an exception if DATABASE_URL is set" was failing with the null $databaseUrl because the tenant DB was never created. This test was ignored during test runs because the test file lacked the 'Test' suffix.
This commit is contained in:
lukinovec 2026-05-01 11:52:56 +02:00
parent fc6a931a32
commit f5f5f1d4aa

View file

@ -82,6 +82,10 @@ test('database tenancy bootstrapper throws an exception if DATABASE_URL is set',
config(['tenancy.bootstrappers' => [DatabaseTenancyBootstrapper::class]]);
Event::listen(TenantCreated::class, JobPipeline::make([CreateDatabase::class])->send(function (TenantCreated $event) {
return $event->tenant;
})->toListener());
$tenant1 = Tenant::create();
pest()->artisan('tenants:migrate');