I am trying to write a simple unit test were I try to login with an invalid user in my Laravel Nova but I keep getting this error when I run the test:
Session is missing expected key [errors].
Failed asserting that false is true.
my test:
public function an_invalid_user_can_not_login()
{
$user = factory(User::class)->create();
$response = $this->post('/nova/login', [
'email' => $user->email,
'password' => 'invalid',
'_token' => csrf_token(),
]);
$response->assertSessionHasErrors();
$this->assertGuest();
}
What am I doing wrong here?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire