i wrote this unit test for login for laravel
class LoginTest extends TestCase
{
/** @test */
public function auth()
{
$this->withoutMiddleware();
$this->visit('/login')
->post('/login', ['example@example.com', "password"=>"1234"])
->seeJson([
"login"=>"true"
]);
$this->get('/dashboard');
}
}
but i get this error
Invalid JSON was returned from the route. Perhaps an exception was thrown?
how i can solve this issue ?
via flower