mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 17:14:03 +00:00
remove irrelevant assertions
This commit is contained in:
parent
f69bc2add0
commit
a4aea29303
1 changed files with 2 additions and 7 deletions
|
|
@ -184,7 +184,6 @@ test('run command works when sub command asks questions and accepts arguments',
|
||||||
$tenant = Tenant::create();
|
$tenant = Tenant::create();
|
||||||
$id = $tenant->getTenantKey();
|
$id = $tenant->getTenantKey();
|
||||||
|
|
||||||
// Run tenant migrations so we have users table
|
|
||||||
Artisan::call('tenants:migrate');
|
Artisan::call('tenants:migrate');
|
||||||
|
|
||||||
pest()->artisan("tenants:run --tenants=$id 'user:addwithname Abrar' ")
|
pest()->artisan("tenants:run --tenants=$id 'user:addwithname Abrar' ")
|
||||||
|
|
@ -195,15 +194,11 @@ test('run command works when sub command asks questions and accepts arguments',
|
||||||
// Assert we are in central context
|
// Assert we are in central context
|
||||||
expect(tenancy()->initialized)->toBeFalse();
|
expect(tenancy()->initialized)->toBeFalse();
|
||||||
|
|
||||||
// Assert users table does not exist in the central context
|
// Assert user was created in tenant context
|
||||||
expect(Schema::hasTable('users'))->toBeFalse();
|
|
||||||
|
|
||||||
// Assert user created in tenant context
|
|
||||||
tenancy()->initialize($tenant);
|
tenancy()->initialize($tenant);
|
||||||
expect(Schema::hasTable('users'))->toBeTrue();
|
|
||||||
$user = User::first();
|
$user = User::first();
|
||||||
|
|
||||||
// Assert user is same as provided using command
|
// Assert user is same as provided using the command
|
||||||
expect($user->name)->toBe('Abrar');
|
expect($user->name)->toBe('Abrar');
|
||||||
expect($user->email)->toBe('email@localhost');
|
expect($user->email)->toBe('email@localhost');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue