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

Update RedirectTest

This commit is contained in:
lukinovec 2023-02-21 10:48:24 +01:00
parent 241cf1fd21
commit c49f15b53d

View file

@ -7,6 +7,10 @@ use Illuminate\Support\Facades\Route;
use Stancl\Tenancy\TenancyServiceProvider;
use Stancl\Tenancy\Features\CrossDomainRedirect;
beforeAll(function () {
TenancyServiceProvider::$bootstrapFeatures = false;
});
test('tenant redirect macro replaces only the hostname', function () {
config()->set('tenancy.features', [CrossDomainRedirect::class]);
@ -40,10 +44,10 @@ test('tenant route helper generates correct url', function () {
test('redirect from central to tenant works', function (bool $enabled, bool $shouldThrow) {
if ($enabled) {
config()->set('tenancy.features', [CrossDomainRedirect::class]);
TenancyServiceProvider::bootstrapFeatures();
}
TenancyServiceProvider::bootstrapFeatures();
Route::get('/foobar', function () {
return 'Foo';