From c2d1805eebbe20a80252a1d06aa52ef11c06ffaf Mon Sep 17 00:00:00 2001 From: Abrar Ahmad Date: Wed, 31 Aug 2022 10:43:05 +0500 Subject: [PATCH] cleanup code --- tests/CommandsTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/CommandsTest.php b/tests/CommandsTest.php index 7d44b3b3..3cae34f3 100644 --- a/tests/CommandsTest.php +++ b/tests/CommandsTest.php @@ -16,6 +16,7 @@ use Stancl\Tenancy\Listeners\BootstrapTenancy; use Stancl\Tenancy\Listeners\RevertToCentralContext; use Stancl\Tenancy\Tests\Etc\ExampleSeeder; use Stancl\Tenancy\Tests\Etc\Tenant; +use Stancl\Tenancy\Tests\Etc\User; beforeEach(function () { 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 tenancy()->initialize($tenant); expect(Schema::hasTable('users'))->toBeTrue(); - $user = \Stancl\Tenancy\Tests\Etc\User::first(); + $user = User::first(); // Assert user is same as provided using command expect($user->name)->toBe('Abrar');