Implements Spec 092 legacy purge. Key changes: - Remove legacy Inventory landing page + view; link Inventory entry directly to Inventory Items. - Update Drift landing copy to "operation runs"; remove URL heuristic from context bar. - Remove legacy redirect shim route and assert 404 for old bookmarks. - Staged job payload change: remove legacy ctor arg; keep legacy field for deserialization compatibility; new payload omits field. - Remove legacy notification artifact. - Remove legacy test shim + update tests; strengthen guard suite with scoped exception for job compat field. - Add spec/plan/tasks/checklist artifacts under specs/092-legacy-purge-final. Tests: - Focused Pest suite for guards, legacy routes, redirect behavior, job compatibility, drift copy. - Pint run: `vendor/bin/sail bin pint --dirty`. Notes: - Deploy B final removal of `backupScheduleRunId` should occur only after the compatibility window defined in the spec. Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #110
30 lines
877 B
PHP
30 lines
877 B
PHP
<?php
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Illuminate\Support\Facades\Http;
|
|
|
|
uses(RefreshDatabase::class);
|
|
|
|
beforeEach(function (): void {
|
|
Http::preventStrayRequests();
|
|
});
|
|
|
|
it('returns 404 for known legacy run endpoints', function (): void {
|
|
[$user, $tenant] = createUserWithTenant(role: 'owner');
|
|
|
|
$legacyUrls = [
|
|
"/admin/t/{$tenant->external_id}/operations",
|
|
"/admin/t/{$tenant->external_id}/inventory-sync-runs",
|
|
"/admin/t/{$tenant->external_id}/inventory-sync-runs/123",
|
|
"/admin/t/{$tenant->external_id}/entra-group-sync-runs",
|
|
"/admin/t/{$tenant->external_id}/entra-group-sync-runs/123",
|
|
"/admin/t/{$tenant->external_id}/backup-schedules/1/runs/123",
|
|
];
|
|
|
|
foreach ($legacyUrls as $url) {
|
|
$this->actingAs($user)
|
|
->get($url)
|
|
->assertNotFound();
|
|
}
|
|
});
|