mivita/tests/Unit/Dhl/DhlRouteRegistrationTest.php

15 lines
585 B
PHP

<?php
it('does not register the public tracking route inside the CRM admin group', function () {
$crmRoutes = file_get_contents(base_path('routes/domains/crm.php'));
expect($crmRoutes)
->not->toMatch('/Route::(get|post|match|any)\([^)]*\)->name\([\'"]public\.tracking[\'"]\)/');
});
it('still exposes the public tracking route on the main domain', function () {
$mainRoutes = file_get_contents(base_path('routes/domains/main.php'));
expect($mainRoutes)
->toMatch('/Route::get\([\'"]\/tracking[\'"][^)]*\)->name\([\'"]public\.tracking[\'"]\)/');
});