pases 4 ticket updates

This commit is contained in:
Mark Gregory
2026-06-23 11:05:48 +01:00
parent a6148f9bfd
commit 2266298b6c
5 changed files with 142 additions and 57 deletions
@@ -29,4 +29,15 @@ final class TicketReferenceServiceTest extends TestCase
self::assertSame('HD-'.now()->format('Y').'-00042', $reference);
}
public function test_it_uses_the_highest_reference_suffix_instead_of_latest_database_id(): void
{
$year = now()->format('Y');
$this->ticket(['reference' => 'HD-'.$year.'-00042']);
$this->ticket(['reference' => 'HD-'.$year.'-00002']);
$reference = app(TicketReferenceService::class)->next();
self::assertSame('HD-'.$year.'-00043', $reference);
}
}