Set task status to invalid instead of deleting

[MAILPOET-3359]
This commit is contained in:
wxa
2021-03-08 14:10:48 +03:00
committed by Veljko V
parent a0ad4ffb20
commit 67824f9eb1
4 changed files with 8 additions and 3 deletions

View File

@@ -62,7 +62,9 @@ class SendingTest extends \MailPoetTest {
$this->queue->delete();
$sendings = SendingTask::createManyFromTasks([$this->task]);
expect($sendings)->isEmpty();
expect(ScheduledTask::findOne($this->task->id))->equals(false);
$task = ScheduledTask::findOne($this->task->id);
assert($task instanceof ScheduledTask);
expect($task->status)->equals(ScheduledTask::STATUS_INVALID);
}
public function testItCanBeCreatedFromScheduledTask() {