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

Fix assertion for domain or subdomain ID exception

The test asserted that NotASubdomainException was thrown when visiting localhost/central-route.
Because this exception is only thrown after the host is identified as a subdomain, while calling `makeSubdomain()`, NotASubdomainException is not thrown in this case anymore.
This commit is contained in:
lukinovec 2025-12-29 14:21:15 +01:00
parent 4287f2a8a0
commit e37d4b67bd

View file

@ -300,7 +300,7 @@ test('using different default route modes works with global domain identificatio
$exception = match ($middleware) { $exception = match ($middleware) {
InitializeTenancyByDomain::class => TenantCouldNotBeIdentifiedOnDomainException::class, InitializeTenancyByDomain::class => TenantCouldNotBeIdentifiedOnDomainException::class,
InitializeTenancyBySubdomain::class => NotASubdomainException::class, InitializeTenancyBySubdomain::class => NotASubdomainException::class,
InitializeTenancyByDomainOrSubdomain::class => NotASubdomainException::class, InitializeTenancyByDomainOrSubdomain::class => TenantCouldNotBeIdentifiedOnDomainException::class,
}; };
expect(fn () => $this->withoutExceptionHandling()->get('http://localhost/central-route'))->toThrow($exception); expect(fn () => $this->withoutExceptionHandling()->get('http://localhost/central-route'))->toThrow($exception);