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

Fix bootstrapper order in test, add url('/') assertion

This commit is contained in:
lukinovec 2024-12-20 11:22:27 +01:00
parent 354ec1fb2a
commit 4d8b092e56

View file

@ -72,7 +72,7 @@ test('root url bootstrapper overrides the root url when tenancy gets initialized
}); });
test('root url bootstrapper can be used with url generator bootstrapper', function() { test('root url bootstrapper can be used with url generator bootstrapper', function() {
config(['tenancy.bootstrappers' => [RootUrlBootstrapper::class, UrlGeneratorBootstrapper::class]]); config(['tenancy.bootstrappers' => [UrlGeneratorBootstrapper::class, RootUrlBootstrapper::class]]);
TenancyUrlGenerator::$prefixRouteNames = true; TenancyUrlGenerator::$prefixRouteNames = true;
TenancyUrlGenerator::$passTenantParameterToRoutes = true; TenancyUrlGenerator::$passTenantParameterToRoutes = true;
@ -98,4 +98,5 @@ test('root url bootstrapper can be used with url generator bootstrapper', functi
tenancy()->initialize($tenant); tenancy()->initialize($tenant);
expect(route('home'))->toBe('http://localhost/acme'); expect(route('home'))->toBe('http://localhost/acme');
expect(url('/'))->toBe('http://localhost/acme');
}); });