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

assert that creation attributes returns null

This commit is contained in:
Abrar Ahmad 2022-08-29 12:16:34 +05:00
parent 3368c4cb16
commit 55d858b601

View file

@ -137,7 +137,7 @@ test('creating the resource in tenant database creates it in central database as
tenancy()->initialize($tenant);
// Create the user in tenant DB
ResourceUser::create([
$resourceUser = ResourceUser::create([
'global_id' => 'acme',
'name' => 'John Doe',
'email' => 'john@localhost',
@ -148,6 +148,7 @@ test('creating the resource in tenant database creates it in central database as
tenancy()->end();
// Assert central user and Resource user has exact same attributes and values
expect($resourceUser->getResourceCreationAttributes())->toBeNull();
expect(CentralUser::first()->toArray())->toEqual(ResourceUser::first()->toArray());
});