fix(CleanupRedisTest): update mock return values for hgetall to reflect job processing state

This commit is contained in:
Andras Bacsai 2025-11-11 23:17:25 +01:00
parent 3d260d6c29
commit 4055c1790b

View file

@ -64,7 +64,11 @@
// Mock command() for hgetall to get job data
$redisMock->shouldReceive('command')
->with('hgetall', Mockery::any())
->andReturn(['status' => 'pending', 'payload' => '{}']);
->andReturn([
'status' => 'processing',
'reserved_at' => time() - 60, // Started 1 minute ago
'payload' => json_encode(['displayName' => 'TestJob']),
]);
Redis::shouldReceive('connection')
->with('horizon')