Initialer Laravel Commit für BetiX
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (8.4) (push) Has been cancelled
tests / ci (8.5) (push) Has been cancelled

This commit is contained in:
2026-04-04 18:01:50 +02:00
commit 0280278978
374 changed files with 65210 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php
test('registration screen can be rendered', function () {
$response = $this->get(route('register'));
$response->assertOk();
});
test('new users can register', function () {
$response = $this->post('/register', [
'username' => 'Dolo',
'first_name' => 'Kevin',
'last_name' => 'Geiger',
'email' => 'laynox9@gmail.com',
'birthdate' => '2004-01-23',
'gender' => 'male',
'phone' => '+4915112350255',
'country' => 'DE',
'address_line1' => 'Siedlerstr. 15',
'address_line2' => '',
'city' => 'Türkheim',
'postal_code' => '86842',
'currency' => 'EUR',
'password' => 'Geheim123!',
'password_confirmation' => 'Geheim123!',
'is_adult' => true,
'terms_accepted' => true
]);
if ($response->status() !== 302) {
// Log errors to see what's failing if it's not a redirect
$errors = session('errors');
if ($errors) {
fwrite(STDERR, print_r($errors->getMessages(), true));
}
}
$response->assertStatus(302);
$this->assertAuthenticated('web');
$response->assertRedirect(route('dashboard', absolute: false));
});