test for date end being before date start
This commit is contained in:
parent
a752ff9ba5
commit
858f2e075f
2 changed files with 21 additions and 0 deletions
|
|
@ -216,4 +216,18 @@ class CreatePlanTest extends TestCase
|
|||
dateEnd: null,
|
||||
));
|
||||
}
|
||||
|
||||
public function test_throws_if_date_end_is_before_date_start(): void
|
||||
{
|
||||
$this->expectException(BadRequestException::class);
|
||||
$this->expectExceptionMessage('date end cannot be before date start');
|
||||
|
||||
$this->useCase->execute(new CreatePlanRequest(
|
||||
userId: 0,
|
||||
name: 'test',
|
||||
textId: 0,
|
||||
dateStart: '2025-01-02',
|
||||
dateEnd: '2025-01-01',
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue