mirror of
https://github.com/archtechx/tenancy.git
synced 2026-08-06 06:54:03 +00:00
Test that when a tenant doesn't have the property that should be mapped to config, the central config values are kept
This commit is contained in:
parent
120cec440b
commit
12e51d0378
1 changed files with 7 additions and 0 deletions
|
|
@ -152,6 +152,13 @@ test('BroadcastingConfigBootstrapper maps tenant properties to broadcaster crede
|
||||||
expect(app(BroadcasterContract::class)->config['key'])->toBe('tenant1_key');
|
expect(app(BroadcasterContract::class)->config['key'])->toBe('tenant1_key');
|
||||||
expect(Broadcast::driver()->config['key'])->toBe('tenant1_key');
|
expect(Broadcast::driver()->config['key'])->toBe('tenant1_key');
|
||||||
|
|
||||||
|
// Initializing tenancy for a tenant without the mapped property keeps the central config value
|
||||||
|
tenancy()->initialize(Tenant::create());
|
||||||
|
|
||||||
|
expect(config("broadcasting.connections.{$driver}.key"))->toBe('central_key');
|
||||||
|
expect(app(BroadcastManager::class)->driver()->config['key'])->toBe('central_key');
|
||||||
|
expect(app(BroadcasterContract::class)->config['key'])->toBe('central_key');
|
||||||
|
|
||||||
tenancy()->end();
|
tenancy()->end();
|
||||||
|
|
||||||
expect(config("broadcasting.connections.{$driver}.key"))->toBe('central_key');
|
expect(config("broadcasting.connections.{$driver}.key"))->toBe('central_key');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue