mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Added automated tests for API
This commit is contained in:
parent
29a03179a9
commit
f74b30cdde
@ -1,4 +1,4 @@
|
||||
<?php //[STAMP] 33bf8261bed0f36cf769e15182e6d905
|
||||
<?php //[STAMP] a3cf36879dbbec28f15389e7d8d325a2
|
||||
namespace _generated;
|
||||
|
||||
// This class was automatically generated by build task
|
||||
|
@ -70,6 +70,18 @@ class APICest
|
||||
$this->createEntity('tax_rate', $data);
|
||||
$this->listEntities('tax_rate');
|
||||
|
||||
$data = new stdClass;
|
||||
$data->product_key = $this->faker->word;
|
||||
$data->notes = $this->faker->realText(100);
|
||||
$this->createEntity('product', $data);
|
||||
$this->listEntities('product');
|
||||
|
||||
$data = new stdClass;
|
||||
$data->name = $this->faker->word;
|
||||
$data->vendorcontacts = [];
|
||||
$this->createEntity('vendor', $data);
|
||||
$this->listEntities('vendor');
|
||||
|
||||
$this->listEntities('account');
|
||||
}
|
||||
|
||||
@ -79,6 +91,7 @@ class APICest
|
||||
|
||||
$response = $this->sendRequest("{$entityType}s", $data);
|
||||
$entityId = $response->data->id;
|
||||
|
||||
PHPUnit_Framework_Assert::assertGreaterThan(0, $entityId);
|
||||
|
||||
return $entityId;
|
||||
|
Loading…
Reference in New Issue
Block a user