I am trying to test a route that will return a status code 500 if not visited with the correct query string parameter.
The route is http://localhost:8000/apiRequest?q=ASX.AX
I have done this
public function test_api_response()
{
$user = factory(User::class)->create();
$response = $this->actingAs($user)->call('GET', '/apiRequest', ['_token' => Session::token()], $parameters = ["q" => "ASX.AX"]);
$this->assertEquals(200, $response->status());
}
But the response is 500. Any help?