reinstalled

This commit is contained in:
2025-05-06 23:15:56 +05:45
parent 96e5efeb1b
commit 9392d34c76
66 changed files with 2145 additions and 1096 deletions

View File

@ -1,31 +1,19 @@
<?php
namespace Tests\Feature\Auth;
test('registration screen can be rendered', function () {
$response = $this->get('/register');
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
$response->assertStatus(200);
});
class RegistrationTest extends TestCase
{
use RefreshDatabase;
test('new users can register', function () {
$response = $this->post('/register', [
'name' => 'Test User',
'email' => 'test@example.com',
'password' => 'password',
'password_confirmation' => 'password',
]);
public function test_registration_screen_can_be_rendered(): void
{
$response = $this->get('/register');
$response->assertStatus(200);
}
public function test_new_users_can_register(): void
{
$response = $this->post('/register', [
'name' => 'Test User',
'email' => 'test@example.com',
'password' => 'password',
'password_confirmation' => 'password',
]);
$this->assertAuthenticated();
$response->assertRedirect(route('dashboard', absolute: false));
}
}
$this->assertAuthenticated();
$response->assertRedirect(route('dashboard', absolute: false));
});