mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 19:14:03 +00:00
cleanup code
This commit is contained in:
parent
e219bf8943
commit
c2d1805eeb
1 changed files with 2 additions and 1 deletions
|
|
@ -16,6 +16,7 @@ use Stancl\Tenancy\Listeners\BootstrapTenancy;
|
||||||
use Stancl\Tenancy\Listeners\RevertToCentralContext;
|
use Stancl\Tenancy\Listeners\RevertToCentralContext;
|
||||||
use Stancl\Tenancy\Tests\Etc\ExampleSeeder;
|
use Stancl\Tenancy\Tests\Etc\ExampleSeeder;
|
||||||
use Stancl\Tenancy\Tests\Etc\Tenant;
|
use Stancl\Tenancy\Tests\Etc\Tenant;
|
||||||
|
use Stancl\Tenancy\Tests\Etc\User;
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
Event::listen(TenantCreated::class, JobPipeline::make([CreateDatabase::class])->send(function (TenantCreated $event) {
|
Event::listen(TenantCreated::class, JobPipeline::make([CreateDatabase::class])->send(function (TenantCreated $event) {
|
||||||
|
|
@ -197,7 +198,7 @@ test('run command works when sub command asks question and accepts argument', cl
|
||||||
// Assert user created in tenant context
|
// Assert user created in tenant context
|
||||||
tenancy()->initialize($tenant);
|
tenancy()->initialize($tenant);
|
||||||
expect(Schema::hasTable('users'))->toBeTrue();
|
expect(Schema::hasTable('users'))->toBeTrue();
|
||||||
$user = \Stancl\Tenancy\Tests\Etc\User::first();
|
$user = User::first();
|
||||||
|
|
||||||
// Assert user is same as provided using command
|
// Assert user is same as provided using command
|
||||||
expect($user->name)->toBe('Abrar');
|
expect($user->name)->toBe('Abrar');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue