1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 20:54:04 +00:00

Fix db_name_is_prefixed test

This commit is contained in:
Samuel Štancl 2019-09-21 19:37:19 +02:00
parent a4ab7ac080
commit 8dae2dcc6f
3 changed files with 9 additions and 3 deletions

View file

@ -5,9 +5,13 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Tests;
use Route;
use Stancl\Tenancy\Tenant;
class TenantRedirectMacroTest extends TestCase
{
public $autoCreateTenant = false;
public $autoInitTenancy = false;
/** @test */
public function tenant_redirect_macro_replaces_only_the_hostname()
{
@ -19,6 +23,9 @@ class TenantRedirectMacroTest extends TestCase
return redirect()->route('home')->tenant('abcd');
});
Tenant::create('foo.localhost');
tenancy()->init('foo.localhost');
$this->get('/redirect')
->assertRedirect('http://abcd/foobar');
}