I want to test the user login without using dusk.
My problem is that I want to test the html form with the email and password fields, then complete those fields and if the login was correct, show the home route for example.
In previous versions we made this:
$this->type('email', 'example@gmail.com); $this->type('password', '123456');
Now, I dont know how to do it.
$this->actingAs($user); //USUARIO CREADO ANTERIORMENTE
$response = $this->get(route('home'));
$response->assertStatus(200)
$response->assertViewIs('home');
The check I can do is that a logged-in user can go to the home path, but not when filling in the forms fields.
Aucun commentaire:
Enregistrer un commentaire