From 17a1fbc123437eaba96bc31adf65ac369627d784 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Wed, 4 Jun 2025 15:58:59 +0200 Subject: [PATCH] Clarify test --- tests/ResourceSyncingTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ResourceSyncingTest.php b/tests/ResourceSyncingTest.php index 8123eec4..74d1a0c8 100644 --- a/tests/ResourceSyncingTest.php +++ b/tests/ResourceSyncingTest.php @@ -111,10 +111,12 @@ afterEach(function () { UpdateOrCreateSyncedResource::$scopeGetModelQuery = null; }); -test('creating the same user across multiple tenants does not create multiple central resources', function () { +test('resources created with the same global id in different tenant dbs will be synced with a single central resource', function () { $tenants = [Tenant::create(), Tenant::create(), Tenant::create()]; migrateUsersTableForTenants(); + // No unique constraint exception will be thrown. + // The syncing logic ensures that there's a single central resource tenancy()->runForMultiple($tenants, function () { // Create a user with the same global_id in each tenant DB TenantUser::create([