mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 12:54:05 +00:00
Merge branch 'master' of github.com:tenancy-for-laravel/v4
This commit is contained in:
commit
b2dc0844eb
24 changed files with 581 additions and 166 deletions
|
|
@ -180,17 +180,17 @@ test('rollback command works', function () {
|
|||
expect(Schema::hasTable('users'))->toBeFalse();
|
||||
});
|
||||
|
||||
test('seed command works', function (){
|
||||
test('seed command works', function () {
|
||||
$tenant = Tenant::create();
|
||||
Artisan::call('tenants:migrate');
|
||||
|
||||
$tenant->run(function (){
|
||||
$tenant->run(function () {
|
||||
expect(DB::table('users')->count())->toBe(0);
|
||||
});
|
||||
|
||||
Artisan::call('tenants:seed', ['--class' => TestSeeder::class]);
|
||||
|
||||
$tenant->run(function (){
|
||||
$tenant->run(function () {
|
||||
$user = DB::table('users');
|
||||
expect($user->count())->toBe(1)
|
||||
->and($user->first()->email)->toBe('seeded@user');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue