Fix unit tests [MAILPOET-903]

This commit is contained in:
stoletniy
2018-02-09 19:46:52 +03:00
parent 99732ac14d
commit be6647d763
27 changed files with 315 additions and 207 deletions

View File

@@ -109,8 +109,8 @@ class Scheduler {
$next_run_date = self::getNextRunDate($newsletter->schedule);
if(!$next_run_date) return;
// do not schedule duplicate queues for the same time
$existing_queue = SendingQueue::where('newsletter_id', $newsletter->id)
->where('scheduled_at', $next_run_date)
$existing_queue = SendingQueue::findTaskByNewsletterId($newsletter->id)
->where('tasks.scheduled_at', $next_run_date)
->findOne();
if($existing_queue) return;
$queue = SendingTask::create();