mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Fixes for test
This commit is contained in:
parent
bcd69dadc8
commit
f87589715f
@ -63,7 +63,7 @@ class DownloadHistoricalInvoiceTest extends TestCase
|
|||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
'X-API-SECRET' => config('ninja.api_secret'),
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
'X-API-TOKEN' => $this->token
|
'X-API-TOKEN' => $this->token
|
||||||
])->get('/api/v1/activities/download_invoice/'.$this->encodePrimaryKey($this->invoice->activities->first()->id));
|
])->get('/api/v1/activities/download_entity/'.$this->encodePrimaryKey($this->invoice->activities->first()->id));
|
||||||
|
|
||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
}
|
}
|
||||||
@ -78,7 +78,7 @@ class DownloadHistoricalInvoiceTest extends TestCase
|
|||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
'X-API-SECRET' => config('ninja.api_secret'),
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
'X-API-TOKEN' => $this->token
|
'X-API-TOKEN' => $this->token
|
||||||
])->get('/api/v1/activities/download_invoice/'.$this->encodePrimaryKey($this->invoice->activities->first()->id));
|
])->get('/api/v1/activities/download_entity/'.$this->encodePrimaryKey($this->invoice->activities->first()->id));
|
||||||
|
|
||||||
$response->assertStatus(404);
|
$response->assertStatus(404);
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ trait MockAccountData
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
factory(\App\Models\ClientContact::class, 1)->create([
|
$contact = factory(\App\Models\ClientContact::class, 1)->create([
|
||||||
'user_id' => $this->user->id,
|
'user_id' => $this->user->id,
|
||||||
'client_id' => $this->client->id,
|
'client_id' => $this->client->id,
|
||||||
'company_id' => $this->company->id,
|
'company_id' => $this->company->id,
|
||||||
@ -161,6 +161,8 @@ trait MockAccountData
|
|||||||
'send_email' => true,
|
'send_email' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$this->client->setRelation('contacts', $contact);
|
||||||
|
|
||||||
factory(\App\Models\ClientContact::class, 1)->create([
|
factory(\App\Models\ClientContact::class, 1)->create([
|
||||||
'user_id' => $this->user->id,
|
'user_id' => $this->user->id,
|
||||||
'client_id' => $this->client->id,
|
'client_id' => $this->client->id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user