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

@@ -64,7 +64,26 @@ class LoginTest extends TestCase
$this->assertGuest();
$response->assertStatus(302);
$response->assertRedirect(route('login', absolute: false));
$response->assertSessionHasErrors(['login' => 'Diese Anmeldedaten wurden nicht gefunden.']);
$response->assertSessionHasErrors(['login' => 'Falsche Anmeldedaten.']);
$this->assertSessionHas('error', 'Ungültige E-Mail oder Passwort.');
}
public function test_login_success_shows_success_flash()
{
$user = User::factory()->create([
'email' => 'success@example.com',
'password' => bcrypt('password'),
'email_verified_at' => now(),
]);
$response = $this->post(route('login.store'), [
'login' => 'success@example.com',
'password' => 'password',
]);
$this->assertAuthenticated();
$response->assertRedirect(route('dashboard', absolute: false));
$this->assertSessionHas('success', 'Sie sind nun eingeloggt.');
}
public function test_login_redirects_unverified_user_to_verification_notice()