mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 23:54:03 +00:00
wip
This commit is contained in:
parent
0b6af429de
commit
f9a819215f
1 changed files with 7 additions and 5 deletions
|
|
@ -45,17 +45,19 @@ class CommandsTest extends TestCase
|
|||
{
|
||||
// connection is sqlite
|
||||
dump(Schema::getConnection()->getName());
|
||||
|
||||
$tenant = tenant()->create('test.localhost');
|
||||
Artisan::call('tenants:migrate', [
|
||||
'--tenants' => [$tenant['uuid']]
|
||||
]);
|
||||
|
||||
tenancy()->init('localhost'); // reconnect the DB
|
||||
|
||||
// connection should be tenant at this point. is still sqlite
|
||||
dump(Schema::getConnection()->getName());
|
||||
// if you remove line 47, connection will be tenant at this point
|
||||
dd('stop');
|
||||
|
||||
$tenant = tenant()->create('test.localhost');
|
||||
Artisan::call('tenants:migrate', [
|
||||
'--tenants' => [$tenant['uuid']]
|
||||
]);
|
||||
|
||||
$this->assertFalse(Schema::hasTable('users'));
|
||||
tenancy()->init('localhost');
|
||||
$this->assertFalse(Schema::hasTable('users'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue