From 32bf96dd99bf014501a94c0be398a6e072665f3a Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Sun, 19 Apr 2026 23:36:18 +0300 Subject: [PATCH] test bulk create nodes throws if count is less than one --- tests/Unit/Node/UseCases/BulkCreateNodesTest.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/Unit/Node/UseCases/BulkCreateNodesTest.php b/tests/Unit/Node/UseCases/BulkCreateNodesTest.php index 13072db..3fd3452 100644 --- a/tests/Unit/Node/UseCases/BulkCreateNodesTest.php +++ b/tests/Unit/Node/UseCases/BulkCreateNodesTest.php @@ -184,4 +184,17 @@ class BulkCreateNodesTest extends TestCase count: null, )); } + + public function test_throws_if_count_is_less_than_one(): void + { + $this->expectException(BadRequestException::class); + $this->expectExceptionMessage('count must be at least 1'); + + $this->useCase->execute(new BulkCreateNodesRequest( + textId: 0, + parentNodeId: $this->parentNode->getId(), + titlePrefix: 'Page', + count: 0, + )); + } }