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