fix api auth problem

This commit is contained in:
Nabeel Shahzad
2018-01-02 14:37:52 -06:00
parent 7700bd6683
commit 6d2f705b40
4 changed files with 9 additions and 5 deletions

View File

@@ -124,10 +124,13 @@ class AcarsTest extends TestCase
{
$uri = '/api/pireps/prefile';
$user = factory(App\Models\User::class)->create();
$pirep = factory(App\Models\Pirep::class)->make(['id' => ''])->toArray();
$pirep = factory(App\Models\Pirep::class)->make([
'id' => '',
'user_id' => $user->id,
])->toArray();
$response = $this->withHeaders($this->apiHeaders())->post($uri, $pirep);
// $response = $this->withHeaders($this->headers($user->api_key))->post($uri, $pirep);
#$response = $this->withHeaders($this->headers($user->api_key))->post($uri, $pirep);
$response->assertStatus(201);
$pirep = $response->json();