mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 16:14:03 +00:00
wip
This commit is contained in:
parent
9520cbc811
commit
36afb7dbdd
4 changed files with 29 additions and 0 deletions
|
|
@ -34,3 +34,20 @@ test('tenant route helper generates correct url', function () {
|
|||
expect(tenant_route('foo.localhost', 'foo', ['a' => 'as', 'b' => 'df']))->toBe('http://foo.localhost/abcdef/as/df');
|
||||
expect(tenant_route('foo.localhost', 'foo', []))->toBe('http://foo.localhost/abcdef');
|
||||
});
|
||||
|
||||
test('redirect from central to tenant works fine', function () {
|
||||
config([
|
||||
'tenancy.features' => [CrossDomainRedirect::class],
|
||||
]);
|
||||
|
||||
Route::get('/foobar', function () {
|
||||
return 'Foo';
|
||||
})->name('home');
|
||||
|
||||
Route::get('/redirect', function () {
|
||||
return redirect()->route('home')->domain('abcd');
|
||||
});
|
||||
|
||||
pest()->get('/redirect')
|
||||
->assertRedirect('http://abcd/foobar');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue