mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 18:24:04 +00:00
Compare commits
3 commits
3974ad046e
...
cbd2f45737
| Author | SHA1 | Date | |
|---|---|---|---|
| cbd2f45737 | |||
|
|
a75528e228 | ||
|
|
cd08becf3d |
1 changed files with 1 additions and 3 deletions
|
|
@ -958,14 +958,12 @@ test('pivot record is automatically deleted with the tenant resource', function(
|
|||
|
||||
$syncMaster->tenants()->attach($tenant);
|
||||
|
||||
expect(DB::select("SELECT * FROM tenant_users WHERE tenant_id = ?", [$tenant->id]))->toHaveCount(1);
|
||||
|
||||
$tenant->run(function () {
|
||||
TenantUser::firstWhere('global_id', 'cascade_user')->delete();
|
||||
});
|
||||
|
||||
// Deleting tenant resource deletes its pivot record
|
||||
expect(DB::select("SELECT * FROM tenant_users WHERE tenant_id = ?", [$tenant->id]))->toHaveCount(0);
|
||||
expect(DB::select("SELECT * FROM tenant_users WHERE tenant_id = ?", [$tenant->getTenantKey()]))->toHaveCount(0);
|
||||
});
|
||||
|
||||
test('DeleteAllTenantMappings handles incorrect configuration correctly', function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue