RegistrationTest.php 517 B

12345678910111213141516171819
  1. <?php
  2. test('registration screen can be rendered', function () {
  3. $response = $this->get(route('register'));
  4. $response->assertStatus(200);
  5. });
  6. test('new users can register', function () {
  7. $response = $this->post(route('register.store'), [
  8. 'name' => 'Test User',
  9. 'email' => 'test@example.com',
  10. 'password' => 'password',
  11. 'password_confirmation' => 'password',
  12. ]);
  13. $this->assertAuthenticated();
  14. $response->assertRedirect(route('dashboard', absolute: false));
  15. });