Files
preregister/tests/Feature/Auth/RegistrationTest.php

34 lines
729 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Feature\Auth;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class RegistrationTest extends TestCase
{
use RefreshDatabase;
public function test_registration_is_disabled(): void
{
$response = $this->get('/register');
$response->assertNotFound();
}
public function test_registration_post_is_rejected(): void
{
$response = $this->post('/register', [
'name' => 'Test User',
'email' => 'test@example.com',
'password' => 'password',
'password_confirmation' => 'password',
]);
$response->assertNotFound();
$this->assertGuest();
}
}