14 lines
773 B
PHP
14 lines
773 B
PHP
<?php
|
|
|
|
it('wires complaint creation through a dedicated route with validation and customer checks', function (): void {
|
|
$content = (string)file_get_contents(app_path('routes/departmentDailyReportsRoute.php'));
|
|
|
|
expect($content)->toContain('/departments/daily-reports/complaints');
|
|
expect($content)->toContain("requirePermission('create_department_daily_report_complaints')");
|
|
expect($content)->toContain("requireDepartmentAccess((int)self::getParameter('department_id'))");
|
|
expect($content)->toContain("getOrImportCustomerByCustomerNumber");
|
|
expect($content)->toContain("Description is required");
|
|
expect($content)->toContain("dailyReportComplaintsRepository()->addComplaint");
|
|
expect($content)->toContain("countForDepartmentsInRange");
|
|
});
|