fix storage on CI setup
All checks were successful
CI/CD Pipeline / deploy (push) Successful in 25s
CI/CD Pipeline / promote_stable (push) Successful in 2s

This commit is contained in:
2026-02-24 19:16:55 +01:00
parent 0b4e0df305
commit 6a2316c6f4
4 changed files with 43 additions and 1 deletions

View File

@@ -285,3 +285,28 @@ it('updates user name and email as admin', function (): void {
expect($target->email)->toBe('new@example.com');
expect($target->email_verified_at)->toBeNull();
});
it('marks email verified when assigning founder role', function (): void {
$admin = makeAdmin();
$founderRole = Role::firstOrCreate(['name' => 'ROLE_FOUNDER'], ['color' => '#111111']);
$target = User::factory()->create([
'name' => 'Target',
'email' => 'target@example.com',
'email_verified_at' => null,
]);
$admin->roles()->syncWithoutDetaching([$founderRole->id]);
Sanctum::actingAs($admin);
$response = $this->patchJson("/api/users/{$target->id}", [
'name' => 'Target',
'email' => 'target@example.com',
'rank_id' => null,
'roles' => ['ROLE_FOUNDER'],
]);
$response->assertOk();
$target->refresh();
expect($target->email_verified_at)->not()->toBeNull();
});