pases 5 ticket updates

This commit is contained in:
Mark Gregory
2026-06-23 11:10:52 +01:00
parent 2266298b6c
commit 7c4a94b5ea
12 changed files with 312 additions and 11 deletions
@@ -29,6 +29,19 @@ final class TicketReferenceServiceTest extends TestCase
self::assertSame('HD-'.now()->format('Y').'-00042', $reference);
}
public function test_it_does_not_reuse_soft_deleted_ticket_references(): void
{
$year = now()->format('Y');
$ticket = $this->ticket(['reference' => 'HD-'.$year.'-00002']);
$ticket->delete();
$reference = app(TicketReferenceService::class)->next();
self::assertSame('HD-'.$year.'-00003', $reference);
}
public function test_it_uses_the_highest_reference_suffix_instead_of_latest_database_id(): void
{
$year = now()->format('Y');