1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 09:54:05 +00:00
This commit is contained in:
Samuel Štancl 2019-08-18 12:23:53 +02:00
parent 6cee5d36ad
commit 31d0d44261
3 changed files with 40 additions and 1 deletions

View file

@ -0,0 +1,23 @@
<?php
namespace Stancl\Tenancy\Tests;
use Route;
class TenantRedirectMacroTest extends TestCase
{
/** @test */
public function tenant_redirect_macro_replaces_only_the_hostname()
{
Route::get('/foobar', function () {
return 'Foo';
})->name('home');
Route::get('/redirect', function () {
return redirect()->route('home')->tenant('abcd');
});
$this->get('/redirect')
->assertRedirect('http://abcd/foobar');
}
}