1
0
Fork 0
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:
Samuel Štancl 2022-11-29 10:19:12 +01:00
commit b2dc0844eb
24 changed files with 581 additions and 166 deletions

View file

@ -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');