mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for tests
This commit is contained in:
parent
7623246424
commit
99bf34b20f
@ -99,7 +99,19 @@ class PurchaseOrderTest extends TestCase
|
||||
{
|
||||
$this->purchase_order->service()->createInvitations()->save();
|
||||
|
||||
$i = $this->purchase_order->fresh()->invitations->first();
|
||||
$i = $this->purchase_order->invitations->first();
|
||||
|
||||
$data = [
|
||||
'ids' => [$this->purchase_order->hashed_id],
|
||||
'action' => 'download',
|
||||
];
|
||||
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->token,
|
||||
])->post("/api/v1/purchase_orders/bulk", $data)
|
||||
->assertStatus(200);
|
||||
|
||||
|
||||
$data = [
|
||||
'ids' =>[$this->purchase_order->hashed_id],
|
||||
@ -146,16 +158,6 @@ class PurchaseOrderTest extends TestCase
|
||||
])->post("/api/v1/purchase_orders/bulk", $data)
|
||||
->assertStatus(200);
|
||||
|
||||
$data = [
|
||||
'ids' =>[$this->purchase_order->hashed_id],
|
||||
'action' => 'download',
|
||||
];
|
||||
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->token,
|
||||
])->post("/api/v1/purchase_orders/bulk", $data)
|
||||
->assertStatus(200);
|
||||
|
||||
$data = [
|
||||
'ids' =>[],
|
||||
|
@ -600,11 +600,6 @@ trait MockAccountData
|
||||
'purchase_order_id' => $this->purchase_order->id,
|
||||
]);
|
||||
|
||||
$purchase_order_invitations = PurchaseOrderInvitation::whereCompanyId($this->purchase_order->company_id)
|
||||
->wherePurchaseOrderId($this->purchase_order->id);
|
||||
|
||||
$this->purchase_order->setRelation('invitations', $purchase_order_invitations);
|
||||
|
||||
$this->purchase_order->service()->markSent();
|
||||
|
||||
$this->purchase_order->setRelation('vendor', $this->vendor);
|
||||
|
Loading…
x
Reference in New Issue
Block a user