1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 12:24:04 +00:00

Update tests/ResourceSyncingUsingPolymorphicTest.php

This commit is contained in:
Samuel Štancl 2023-02-02 06:35:16 +01:00 committed by GitHub
parent 2b7e346b7d
commit 5ba2f8cd54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -151,10 +151,8 @@ test('resource syncing works using a single pivot table for multiple models when
$tenantUser = $tenantUser->toArray();
unset($centralUser['id'], $tenantUser['id']);
// reorder global_id in $centralUser to put it at the last position so we can match the exact array
$centralUser['global_id'] = array_shift($centralUser);
expect($tenantUser)->toBe($centralUser);
// array keys use a different order here
expect($tenantUser)->toEqualCanonicalizing($centralUser);
$tenant2 = ResourceTenantUsingPolymorphic::create(['id' => 't2']);
migrateCompaniesTableForTenants();