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

Merge branch 'master' into broadcasting-tenancy

This commit is contained in:
Samuel Štancl 2023-02-18 13:26:47 +01:00 committed by GitHub
commit 4ac0bb2252
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View file

@ -476,6 +476,7 @@ test('url bootstrapper overrides the root url when tenancy gets initialized and
});
$baseUrl = url(route('home'));
config(['app.url' => $baseUrl]);
$rootUrlOverride = function (Tenant $tenant) use ($baseUrl) {
$scheme = str($baseUrl)->before('://');
@ -493,14 +494,17 @@ test('url bootstrapper overrides the root url when tenancy gets initialized and
expect(url(route('home')))->toBe($baseUrl);
expect(URL::to('/'))->toBe($baseUrl);
expect(config('app.url'))->toBe($baseUrl);
tenancy()->initialize($tenant);
expect(url(route('home')))->toBe($tenantUrl);
expect(URL::to('/'))->toBe($tenantUrl);
expect(config('app.url'))->toBe($tenantUrl);
tenancy()->end();
expect(url(route('home')))->toBe($baseUrl);
expect(URL::to('/'))->toBe($baseUrl);
expect(config('app.url'))->toBe($baseUrl);
});