Add better debugging on GET reqs since the build failed #35
This commit is contained in:
parent
bf4e164e0d
commit
e80caa6827
@ -38,7 +38,7 @@ class PilotTest extends TestCase
|
||||
/**
|
||||
* Check via API
|
||||
*/
|
||||
$resp = $this->get('/api/user/fleet', [], $user);
|
||||
$resp = $this->get('/api/user/fleet', [], $user)->assertStatus(200);
|
||||
$body = $resp->json();
|
||||
|
||||
# Get the subfleet that's been added in
|
||||
@ -52,7 +52,7 @@ class PilotTest extends TestCase
|
||||
/**
|
||||
* Check the user ID call
|
||||
*/
|
||||
$resp = $this->get('/api/users/'.$user->id.'/fleet', [], $user);
|
||||
$resp = $this->get('/api/users/'.$user->id.'/fleet', [], $user)->assertStatus(200);
|
||||
$body = $resp->json();
|
||||
|
||||
# Get the subfleet that's been added in
|
||||
|
@ -124,7 +124,13 @@ abstract class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
$headers['x-api-key'] = $user->api_key;
|
||||
}
|
||||
|
||||
return parent::get($uri, $headers);
|
||||
$req = parent::get($uri, $headers);
|
||||
if($req->isClientError() || $req->isServerError()) {
|
||||
Log::error('Error on '.$uri);
|
||||
Log::error($req->json());
|
||||
}
|
||||
|
||||
return $req;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user