Fix handling of times

This commit is contained in:
Dane Everitt 2018-08-31 21:12:10 -07:00
parent 178b8f8ce6
commit bcb3f5d5fa
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 7 additions and 6 deletions

View file

@ -64,7 +64,7 @@ class ProcessScheduleServiceTest extends TestCase
$formatted = sprintf('%s %s %s * %s', $model->cron_minute, $model->cron_hour, $model->cron_day_of_month, $model->cron_day_of_week);
$this->repository->shouldReceive('update')->with($model->id, [
'is_processing' => true,
'next_run_at' => CronExpression::factory($formatted)->getNextRunDate()->format(Chronos::ATOM),
'next_run_at' => Chronos::parse(CronExpression::factory($formatted)->getNextRunDate()->format(Chronos::ATOM)),
]);
$this->runnerService->shouldReceive('handle')->with($task)->once()->andReturnNull();
@ -84,7 +84,7 @@ class ProcessScheduleServiceTest extends TestCase
$this->repository->shouldReceive('update')->with($model->id, [
'is_processing' => true,
'next_run_at' => Chronos::now()->addSeconds(15)->toAtomString(),
'next_run_at' => Chronos::now()->addSeconds(15),
]);
$this->runnerService->shouldReceive('handle')->with($task)->once()->andReturnNull();