Implement move collected invoice to customer functionality with API endpoint and associated tests

This commit is contained in:
Jeppe Bundgaard
2026-06-09 13:12:55 +02:00
parent fb1f0883e1
commit aca8be51dc
7 changed files with 237 additions and 1 deletions
@@ -34,6 +34,14 @@ it('builds credential-safe normal CORS response headers for allowed origins', fu
expect($headers['Vary'])->toBe('Origin');
});
it('allows the fallback Vite localhost dev origin used after port 5173 is busy', function (): void {
$preflight = cors_policy::preflightResponse('http://localhost:5174', 'https://truckwash.io');
expect($preflight['allowed'])->toBeTrue();
expect($preflight['status'])->toBe(200);
expect($preflight['headers']['Access-Control-Allow-Origin'])->toBe('http://localhost:5174');
});
it('builds preflight CORS response headers for api-v2 release URLs', function (): void {
$preflight = cors_policy::preflightResponse(
'https://api-v2.truckwash.io/master/api',