mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:04:04 +00:00
Move triggerRestoredEvent(), test restoring Syncables
Update comments in DeleteResourceMapping to explain the detach() behavior. Move triggerRestoredEvent() from SyncMaster to Syncable interface, test restoring tenant resources.
This commit is contained in:
parent
f53fcb279f
commit
2b45a01018
4 changed files with 14 additions and 5 deletions
|
|
@ -1102,7 +1102,16 @@ test('restoring soft deleted resources works', function () {
|
|||
CentralUserWithSoftDeletes::withTrashed()->first()->restore();
|
||||
|
||||
tenancy()->runForMultiple([$tenant1, $tenant2], function () {
|
||||
expect(TenantUserWithSoftDeletes::withTrashed()->first()->trashed())->toBeFalse();
|
||||
$tenantResource = TenantUserWithSoftDeletes::withTrashed()->first();
|
||||
|
||||
expect($tenantResource->trashed())->toBeFalse();
|
||||
|
||||
$tenantResource->delete();
|
||||
|
||||
// Restoring a tenant resource works as expected
|
||||
$tenantResource->restore();
|
||||
|
||||
expect($tenantResource->trashed())->toBeFalse();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue