mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-05 19:24:35 -04:00
Additional tests
This commit is contained in:
parent
9c914614fe
commit
719624342a
@ -65,6 +65,34 @@ class ClientTest extends TestCase
|
|||||||
$this->makeTestData();
|
$this->makeTestData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testStoreClientFixes2()
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
"contacts" => [
|
||||||
|
[
|
||||||
|
"email" => "tenda@gmail.com",
|
||||||
|
"first_name" => "Tenda",
|
||||||
|
"last_name" => "Bavuma",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
"name" => "Tenda Bavuma",
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
$response = $this->withHeaders([
|
||||||
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
|
'X-API-TOKEN' => $this->token,
|
||||||
|
])->postJson('/api/v1/clients', $data);
|
||||||
|
|
||||||
|
$response->assertStatus(200);
|
||||||
|
$arr = $response->json();
|
||||||
|
|
||||||
|
$this->assertTrue($arr['data']['contacts'][0]['is_primary']);
|
||||||
|
$this->assertTrue($arr['data']['contacts'][0]['send_email']);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function testStoreClientFixes()
|
public function testStoreClientFixes()
|
||||||
{
|
{
|
||||||
$data = [
|
$data = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user