get('/register'); $response->assertRedirect('/login'); $response->assertSessionHas('error', 'regis sudah ditutup hubungi mandor aja.'); } public function test_new_users_cannot_register(): void { $response = $this->post('/register', [ 'name' => 'Test User', 'email' => 'test@example.com', 'password' => 'password', 'password_confirmation' => 'password', ]); $this->assertGuest(); $response->assertRedirect('/login'); $response->assertSessionHas('error', 'regis sudah ditutup hubungi mandor aja.'); } }