21 lines
792 B
PHP
21 lines
792 B
PHP
<?php
|
|
|
|
it('requires superuser permission for invoicing period distribution all endpoint', function (): void {
|
|
$routeFile = app_path('routes/InvoicingPeriodRoute.php');
|
|
$content = file_get_contents($routeFile);
|
|
|
|
expect($content)->not->toBeFalse();
|
|
expect($content)->toMatch(
|
|
"/\\/superuser\\/invoicing\\/period\\/distribution\\/all'.*?\\\$this->requirePermission\\('superuser_invoicing_period'\\);/s"
|
|
);
|
|
});
|
|
|
|
it('uses shared date-range normalization across invoicing period endpoints', function (): void {
|
|
$routeFile = app_path('routes/InvoicingPeriodRoute.php');
|
|
$content = file_get_contents($routeFile);
|
|
|
|
expect($content)->not->toBeFalse();
|
|
expect(substr_count((string)$content, 'requireAndNormalizeDateRange()'))->toBeGreaterThanOrEqual(5);
|
|
});
|
|
|