mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-07 05:14:04 +00:00
Correct storage deletion test
This commit is contained in:
parent
dc659ed67a
commit
a28593af17
1 changed files with 4 additions and 4 deletions
|
|
@ -206,6 +206,10 @@ test('tenant storage gets created when TenantCreated listens to CreateTenantStor
|
|||
});
|
||||
|
||||
test('tenant storage can get deleted after the tenant when DeletingTenant listens to DeleteTenantStorage', function() {
|
||||
config([
|
||||
'tenancy.bootstrappers' => [FilesystemTenancyBootstrapper::class],
|
||||
]);
|
||||
|
||||
Event::listen(DeletingTenant::class,
|
||||
JobPipeline::make([DeleteTenantStorage::class])->send(function (DeletingTenant $event) {
|
||||
return $event->tenant;
|
||||
|
|
@ -215,12 +219,8 @@ test('tenant storage can get deleted after the tenant when DeletingTenant listen
|
|||
tenancy()->initialize(Tenant::create());
|
||||
$tenantStoragePath = storage_path();
|
||||
|
||||
Storage::fake('test');
|
||||
|
||||
expect(File::isDirectory($tenantStoragePath))->toBeTrue();
|
||||
|
||||
Storage::put('test.txt', 'testing file');
|
||||
|
||||
tenant()->delete();
|
||||
|
||||
expect(File::isDirectory($tenantStoragePath))->toBeFalse();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue