mirror of
https://github.com/archtechx/tenancy.git
synced 2026-08-06 04:54:04 +00:00
Grab the central connection name from the config in harden test
Other tests grab the central connection from the config instead of hardcoding 'central'. Doing the same in 'harden prevents tenants from using the database of another tenant' for consistency.
This commit is contained in:
parent
c784a26cee
commit
e75ac38751
1 changed files with 1 additions and 1 deletions
|
|
@ -115,7 +115,7 @@ test('harden prevents tenants from using the database of another tenant', functi
|
|||
expect(fn () => tenancy()->initialize($tenant))->toThrow(RuntimeException::class);
|
||||
|
||||
// Connection should be reverted back to central
|
||||
expect(DB::connection()->getName())->toBe('central');
|
||||
expect(DB::connection()->getName())->toBe(config('tenancy.database.central_connection'));
|
||||
} else {
|
||||
expect(fn() => tenancy()->initialize($tenant))->not()->toThrow(Throwable::class);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue