Files
fuel-price/tests/Feature/SpaRouteTest.php
Ovidiu U 05b5d1f3b3 feat: add SPA Blade shell and catch-all route
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 17:57:54 +01:00

24 lines
664 B
PHP

<?php
it('serves the spa shell for the root path', function (): void {
$response = $this->get('/');
$response->assertStatus(200);
$response->assertSee('<div id="app">', false);
});
it('serves the spa shell for unknown frontend paths', function (): void {
$response = $this->get('/some/frontend/route');
$response->assertStatus(200);
$response->assertSee('<div id="app">', false);
});
it('does not intercept api routes', function (): void {
$response = $this->get('/api/stations');
// API route handles it (403 from missing key, not SPA HTML)
$response->assertStatus(403);
$response->assertJson(['message' => '']);
});