feat: clean reset tokens daily
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
it('schedules expired auth token cleanup commands', function () {
|
||||
Artisan::call('schedule:list', [
|
||||
'--json' => true,
|
||||
]);
|
||||
|
||||
$tasks = json_decode(Artisan::output(), true, flags: JSON_THROW_ON_ERROR);
|
||||
$commands = collect($tasks)->pluck('command');
|
||||
|
||||
expect($commands)
|
||||
->toContain('php artisan sanctum:prune-expired --hours=24')
|
||||
->toContain('php artisan auth:clear-resets');
|
||||
});
|
||||
Reference in New Issue
Block a user