mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-06 20:34:04 +00:00
Make central domain order not matter in isSubdomain()
This commit is contained in:
parent
3976880dcb
commit
f4ee0a7943
2 changed files with 8 additions and 7 deletions
|
|
@ -110,10 +110,11 @@ test('we cant use a subdomain that doesnt belong to our central domains', functi
|
|||
});
|
||||
|
||||
test('domain resolver correctly determines if string is a subdomain', function() {
|
||||
config(['tenancy.identification.central_domains' => ['app.test']]);
|
||||
config(['tenancy.identification.central_domains' => ['site.com', 'blog.site.com']]);
|
||||
|
||||
expect(DomainTenantResolver::isSubdomain('foo.app.test'))->toBeTrue();
|
||||
expect(DomainTenantResolver::isSubdomain('fooapp.test'))->toBeFalse();
|
||||
expect(DomainTenantResolver::isSubdomain('blog.site.com'))->toBeFalse();
|
||||
expect(DomainTenantResolver::isSubdomain('tenant.site.com'))->toBeTrue();
|
||||
expect(DomainTenantResolver::isSubdomain('tenantsite.com'))->toBeFalse();
|
||||
});
|
||||
|
||||
class SubdomainTenant extends Models\Tenant
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue