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
dc9e06a3d8
commit
abae112fba
@ -65,14 +65,16 @@ class PurchaseOrderTest 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/purchase_orders/{$this->purchase_order->hashed_id}?include=history")
|
])->get("/api/v1/purchase_orders/{$this->purchase_order->hashed_id}?include=activities.history")
|
||||||
->assertStatus(200);
|
->assertStatus(200);
|
||||||
|
|
||||||
$arr = $response->json();
|
$arr = $response->json();
|
||||||
|
|
||||||
$history = $arr['data']['history'];
|
$activities = $arr['data']['activities'];
|
||||||
|
|
||||||
$this->assertTrue(count($history) >= 1);
|
foreach($activities as $activity) {
|
||||||
|
$this->assertTrue(count($activity['history']) >= 1);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user