feat: integrate login/registration into PurchaseWizard
This commit is contained in:
@@ -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', [
|
||||
|
||||
Reference in New Issue
Block a user