<?php

it('registers employee and department endpoints for the workfeed module', function (): void {
    $routeFile = app_path('routes/moduleWorkfeedRoute.php');
    $content = file_get_contents($routeFile);

    expect($content)->not->toBeFalse();
    expect($content)->toContain('/modules/workfeed/employees');
    expect($content)->toContain('/modules/workfeed/employees/{id}');
    expect($content)->toContain('/modules/workfeed/departments');
    expect($content)->toContain("requirePermission('modules_workfeed_employees_view')");
    expect($content)->toContain("requirePermission('modules_workfeed_departments_view')");
});

it('registers shift endpoints for the workfeed module', function (): void {
    $routeFile = app_path('routes/moduleWorkfeedRoute.php');
    $content = file_get_contents($routeFile);

    expect($content)->not->toBeFalse();
    expect($content)->toContain('/modules/workfeed/shifts');
    expect($content)->toContain('/modules/workfeed/shifts/{id}');
    expect($content)->toContain("requirePermission('modules_workfeed_shifts_view')");
});
