1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-09-20 17:04:04 +00:00

Move falsy url_override assertions to more appropriate places

This commit is contained in:
lukinovec 2026-09-08 16:58:42 +02:00
parent e3ba445630
commit 4af473ede5
2 changed files with 28 additions and 31 deletions

View file

@ -146,6 +146,26 @@ test('links to storage disks with a configured root are suffixed if not overridd
expect(storage_path())->toEqual($expectedStoragePath);
});
test('disks with a falsy url_override do not get their url overridden', function ($urlOverride) {
config([
'tenancy.bootstrappers' => [
FilesystemTenancyBootstrapper::class,
],
'tenancy.filesystem.url_override.public' => $urlOverride,
]);
$tenant = Tenant::create();
$centralUrl = config('filesystems.disks.public.url');
tenancy()->initialize($tenant);
expect(config('filesystems.disks.public.url'))->toBe($centralUrl);
})->with([
'empty string' => [''],
'null' => [null],
]);
test('create and delete storage symlinks jobs work', function() {
Event::listen(
TenantCreated::class,