@@ -22,3 +22,15 @@ test('base data seeding is idempotent', function () {
|
||||
|
||||
expect(User::where('email', 'admin@example.com')->count())->toBe(1);
|
||||
});
|
||||
|
||||
test('the seeded admin is grandfathered so a fresh install works', function () {
|
||||
seed(BaseDatabaseSeeder::class);
|
||||
|
||||
$admin = User::where('email', 'admin@example.com')->firstOrFail();
|
||||
|
||||
expect($admin->currentOrganization()->first())
|
||||
->not->toBeNull()
|
||||
->lifetime_access->toBeTrue();
|
||||
|
||||
expect($admin->hasActiveSubscription())->toBeTrue();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user