public function testPatchActionWhenEmployeeDoesNotExistReturns404()
{
//error need to be tested as production or exception will be thrown in debug mode.
$this->app['config']->set('app.debug', false);
$content = <<<JSON
{
"data": {
"type": "employee",
"id": 1000,
"attributes": {
"email_address": "[email protected]"
}
}
}
JSON;
$response = $this->call('PATCH', 'http://localhost/employees/1000', json_decode($content, true), [], [], []);
$this->assertEquals(404, $response->getStatusCode());
$this->assertEquals('application/vnd.api+json', $response->headers->get('Content-type'));
}