Delete tasks without queues when fetching sending tasks
[MAILPOET-3379]
This commit is contained in:
@ -58,6 +58,13 @@ class SendingTest extends \MailPoetTest {
|
||||
expect($queue->taskId)->equals($this->task->id);
|
||||
}
|
||||
|
||||
public function testItDeletesInvalidTasksWhenCreatingManyFromTasks() {
|
||||
$this->queue->delete();
|
||||
$sendings = SendingTask::createManyFromTasks([$this->task]);
|
||||
expect($sendings)->isEmpty();
|
||||
expect(ScheduledTask::findOne($this->task->id))->equals(false);
|
||||
}
|
||||
|
||||
public function testItCanBeCreatedFromScheduledTask() {
|
||||
$sending = SendingTask::createFromScheduledTask($this->task);
|
||||
$queue = $sending->queue();
|
||||
|
Reference in New Issue
Block a user