How can I to test user authentication? My test:
public function successLogin()
{
$user = User::factory()->create(['login' => '123']);
$user->makeVisible(['password']);
$this->post(route('login'), $user->toArray());
$this->assertAuthenticated(); // not asserts
}
I saw this decision
$this->User->makeVisible(['password']);
But what is this proterty? Model? It is undefined.
Aucun commentaire:
Enregistrer un commentaire