🔥 **Cleanup:** Removed BookCase and OrangePill models, factories, migrations, and related references. Added tests for new service and meetup creation flows. Updated PHPUnit settings and browser-specific configurations.

This commit is contained in:
BT
2026-05-02 22:00:26 +01:00
parent 63aed880e1
commit 04e3e30fcf
54 changed files with 3440 additions and 298 deletions
@@ -0,0 +1,28 @@
<?php
use App\Models\LoginKey;
use App\Models\User;
it('deletes login keys older than 1 day and keeps recent ones', function () {
$user = User::factory()->create();
$old = LoginKey::factory()->create([
'user_id' => $user->id,
'created_at' => now()->subDays(2),
'updated_at' => now()->subDays(2),
]);
$recent = LoginKey::factory()->create([
'user_id' => $user->id,
'created_at' => now()->subHours(2),
'updated_at' => now()->subHours(2),
]);
$this->artisan('loginkeys:cleanup')->assertExitCode(0);
expect(LoginKey::query()->find($old->id))->toBeNull();
expect(LoginKey::query()->find($recent->id))->not->toBeNull();
});
it('runs cleanly when no login keys exist', function () {
$this->artisan('loginkeys:cleanup')->assertExitCode(0);
});