mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 13:14:05 +00:00
Update RedirectTest
This commit is contained in:
parent
241cf1fd21
commit
c49f15b53d
1 changed files with 6 additions and 2 deletions
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue