TenantAtlas/tests/Feature/DatabaseSeederTest.php
ahmido 81c010fa00 fix: Harden SyncPoliciesJob supported types handling (#75)
Harden SyncPoliciesJob type input parsing + fail fast when supported types are empty/mismatched. Pass supported policy types from Tenant sync action and add regression tests.

Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.fritz.box>
Reviewed-on: #75
2026-01-26 19:23:40 +00:00

17 lines
523 B
PHP

<?php
use Database\Seeders\DatabaseSeeder;
use Illuminate\Support\Facades\Auth;
it('can run the database seeder twice without duplicate user errors', function () {
$this->seed(DatabaseSeeder::class);
$this->seed(DatabaseSeeder::class);
$user = \App\Models\User::query()->where('email', 'test@example.com')->first();
expect($user)->not->toBeNull();
expect($user->email)->toBe('test@example.com');
expect(Auth::attempt(['email' => 'test@example.com', 'password' => 'password']))->toBeTrue();
});