mirror of
https://github.com/archtechx/tenancy.git
synced 2026-09-20 11:14:03 +00:00
Assert that DeleteTenantStorage does not delete the central storage directory when the FS bootstrapper is disabled
With the bootstrapper disabled, the job resolves the path to a tenant directory that was never created, so nothing gets deleted.
This commit is contained in:
parent
1fb9acec75
commit
c1e09fb25d
1 changed files with 11 additions and 0 deletions
|
|
@ -218,6 +218,17 @@ test('tenant storage gets deleted during tenant deletion when the DeletingTenant
|
|||
expect(File::isDirectory($centralStoragePath))->toBeTrue();
|
||||
})->with([true, false]);
|
||||
|
||||
test('DeleteTenantStorage does not delete the central storage directory when the filesystem bootstrapper is disabled', function () {
|
||||
config(['tenancy.bootstrappers' => []]);
|
||||
|
||||
$centralStoragePath = storage_path();
|
||||
$tenant = Tenant::create();
|
||||
|
||||
(new DeleteTenantStorage($tenant))->handle();
|
||||
|
||||
expect(File::isDirectory($centralStoragePath))->toBeTrue();
|
||||
});
|
||||
|
||||
test('the framework/cache directory is created when storage_path is scoped', function (bool $suffixStoragePath) {
|
||||
config([
|
||||
'tenancy.bootstrappers' => [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue