das marketing frontend wurde auf lokalisierte urls umgestellt.

This commit is contained in:
Codex Agent
2025-11-03 15:50:10 +01:00
parent c0c1d31385
commit 55c606bdd4
47 changed files with 1592 additions and 251 deletions

View File

@@ -13,9 +13,9 @@ class RegistrationTest extends TestCase
{
use RefreshDatabase;
private function assertRedirectsToDashboard($response): void
private function assertRedirectsToVerification($response): void
{
$expected = route('dashboard', absolute: false);
$expected = route('verification.notice', absolute: false);
$target = $response->headers->get('Location')
?? $response->headers->get('X-Inertia-Location');
@@ -23,7 +23,7 @@ class RegistrationTest extends TestCase
$this->assertTrue(
$target === $expected || Str::endsWith($target, $expected),
'Registration should redirect or instruct Inertia to navigate to the dashboard.'
'Registration should redirect or instruct Inertia to navigate to the verification notice.'
);
}
@@ -50,7 +50,7 @@ class RegistrationTest extends TestCase
]);
$this->assertAuthenticated();
$this->assertRedirectsToDashboard($response);
$this->assertRedirectsToVerification($response);
$this->assertDatabaseHas('users', ['email' => 'test@example.com']);
$this->assertDatabaseHas('tenants', [
'user_id' => User::latest()->first()->id,
@@ -76,7 +76,7 @@ class RegistrationTest extends TestCase
]);
$this->assertAuthenticated();
$this->assertRedirectsToDashboard($response);
$this->assertRedirectsToVerification($response);
$user = User::latest()->first();
$tenant = Tenant::where('user_id', $user->id)->first();
@@ -116,7 +116,10 @@ class RegistrationTest extends TestCase
'package_id' => $paidPackage->id,
]);
$response->assertRedirect(route('marketing.buy', $paidPackage->id));
$response->assertRedirect(route('buy.packages', [
'locale' => 'de',
'packageId' => $paidPackage->id,
]));
$this->assertDatabaseHas('users', ['email' => 'paid@example.com']);
$this->assertDatabaseMissing('tenant_packages', ['package_id' => $paidPackage->id]);
}
@@ -157,7 +160,7 @@ class RegistrationTest extends TestCase
]);
$this->assertAuthenticated();
$this->assertRedirectsToDashboard($response);
$this->assertRedirectsToVerification($response);
}
public function test_registration_fails_with_short_password(): void