get('/login'); $response->assertStatus(200); } public function test_users_can_authenticate_using_the_login_screen(): void { $response = $this->post('/login', [ 'email' => $this->user->email, 'password' => 'password', ]); $this->assertAuthenticated(); $response->assertRedirect(RouteServiceProvider::HOME); } public function test_users_can_not_authenticate_with_invalid_password(): void { $this->post('/login', [ 'email' => $this->user->email, 'password' => 'wrong-password', ]); $this->assertGuest(); } public function test_redirect_if_not_authenticated(): void { $response = $this->get('/servers'); $response->assertRedirect('/login'); } }