1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-13 17:24:03 +00:00

Rename and move triggerRestoredEvent

Rename triggerRestoredEvent to triggerRestoreEvent, move triggerRestoreEvent
from the Syncable interface to SyncMaster, call triggerRestoreEvent only when
restoring SyncMaster, delete useless assertions.
This commit is contained in:
lukinovec 2025-11-21 15:34:28 +01:00
parent 2b45a01018
commit ed12b92bd8
4 changed files with 6 additions and 15 deletions

View file

@ -1102,16 +1102,7 @@ test('restoring soft deleted resources works', function () {
CentralUserWithSoftDeletes::withTrashed()->first()->restore();
tenancy()->runForMultiple([$tenant1, $tenant2], function () {
$tenantResource = TenantUserWithSoftDeletes::withTrashed()->first();
expect($tenantResource->trashed())->toBeFalse();
$tenantResource->delete();
// Restoring a tenant resource works as expected
$tenantResource->restore();
expect($tenantResource->trashed())->toBeFalse();
expect(TenantUserWithSoftDeletes::withTrashed()->first()->trashed())->toBeFalse();
});
});