feat: integrate login/registration into PurchaseWizard

This commit is contained in:
Codex Agent
2025-10-04 21:38:03 +02:00
parent 3c0bbb688b
commit fdaa2bec62
52 changed files with 1477 additions and 732 deletions

View File

@@ -123,9 +123,30 @@ class RegistrationTest extends TestCase
$response->assertStatus(302);
$response->assertSessionHasErrors(['email' => 'Das E-Mail muss eine gültige E-Mail-Adresse sein.']);
$this->assertSessionHas('error', 'Registrierung fehlgeschlagen.');
$this->assertDatabaseMissing('users', ['email' => 'invalid-email']);
}
public function test_registration_success_shows_success_flash()
{
$response = $this->post('/de/register', [
'name' => 'Test User',
'username' => 'successreg',
'email' => 'successreg@example.com',
'password' => 'Password123!',
'password_confirmation' => 'Password123!',
'first_name' => 'Max',
'last_name' => 'Mustermann',
'address' => 'Musterstr. 1',
'phone' => '+49123456789',
'privacy_consent' => true,
]);
$this->assertAuthenticated();
$response->assertRedirect(route('dashboard', absolute: false));
$this->assertSessionHas('success', 'Registrierung erfolgreich fortfahren mit Kauf.');
}
public function test_registration_fails_with_short_password()
{
$response = $this->post('/de/register', [