From 9d831915de8b04fb18153f03d39c533bcea2b548 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Fri, 24 Apr 2026 11:02:55 +0300 Subject: [PATCH] test create plan schedules nodes --- tests/e2e/Controllers/PlanControllerTest.php | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) 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)); + } }