diff --git a/tests/e2e/Controllers/PlanControllerTest.php b/tests/e2e/Controllers/PlanControllerTest.php index 6d3796f..ee51012 100644 --- a/tests/e2e/Controllers/PlanControllerTest.php +++ b/tests/e2e/Controllers/PlanControllerTest.php @@ -256,4 +256,25 @@ class PlanControllerTest extends TestCase $this->assertNotNull($storedPlan); $this->assertEquals('Persistent Plan', $storedPlan->getName()); } + + public function test_create_plan_schedules_nodes(): void + { + $this->controller->createPlan( + $this->makeRequest([ + 'userId' => 0, + 'textId' => 0, + 'name' => 'Scheduling Plan', + 'dateStart' => '2025-01-01', + 'dateEnd' => '2025-01-01', + ]), + new Response(), + $this->createPlan, + ); + + $this->assertEquals( + 1, + $this->scheduledNodeRepo->getNumberOfTimesCreateCalled() + ); + $this->assertNotNull($this->scheduledNodeRepo->find(0)); + } }