]> git.localhorst.tv Git - alttp.git/blob - tests/Feature/Auth/RegistrationTest.php
add discord auth
[alttp.git] / tests / Feature / Auth / RegistrationTest.php
1 <?php
2
3 namespace Tests\Feature\Auth;
4
5 use App\Providers\RouteServiceProvider;
6 use Illuminate\Foundation\Testing\RefreshDatabase;
7 use Tests\TestCase;
8
9 class RegistrationTest extends TestCase
10 {
11     use RefreshDatabase;
12
13     public function test_registration_screen_can_be_rendered()
14     {
15         $response = $this->get('/register');
16
17         $response->assertStatus(200);
18     }
19
20     public function test_new_users_can_register()
21     {
22         $response = $this->post('/register', [
23             'name' => 'Test User',
24             'email' => 'test@example.com',
25             'password' => 'password',
26             'password_confirmation' => 'password',
27         ]);
28
29         $this->assertAuthenticated();
30         $response->assertRedirect(RouteServiceProvider::HOME);
31     }
32 }