mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 11:04:34 -04:00
Fixes for test seed data
This commit is contained in:
parent
a669328a80
commit
60766a7510
@ -30,6 +30,7 @@ class PaymentFactory extends Factory
|
|||||||
'transaction_reference' => $this->faker->text(10),
|
'transaction_reference' => $this->faker->text(10),
|
||||||
'type_id' => Payment::TYPE_CREDIT_CARD,
|
'type_id' => Payment::TYPE_CREDIT_CARD,
|
||||||
'status_id' => Payment::STATUS_COMPLETED,
|
'status_id' => Payment::STATUS_COMPLETED,
|
||||||
|
'currency_id' => 1,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,8 @@ class ClientApiTest extends TestCase
|
|||||||
use MockAccountData;
|
use MockAccountData;
|
||||||
use ClientGroupSettingsSaver;
|
use ClientGroupSettingsSaver;
|
||||||
|
|
||||||
|
public $faker;
|
||||||
|
|
||||||
protected function setUp() :void
|
protected function setUp() :void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
@ -175,20 +177,16 @@ class ClientApiTest extends TestCase
|
|||||||
'status' => 'paid',
|
'status' => 'paid',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$response = $this->withHeaders([
|
||||||
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
|
'X-API-TOKEN' => $this->token,
|
||||||
|
])->postJson('/api/v1/client_statement', $data);
|
||||||
|
|
||||||
try {
|
$response->assertStatus(200);
|
||||||
$response = $this->withHeaders([
|
|
||||||
'X-API-SECRET' => config('ninja.api_secret'),
|
|
||||||
'X-API-TOKEN' => $this->token,
|
|
||||||
])->postJson('/api/v1/client_statement', $data);
|
|
||||||
} catch (ValidationException $e) {
|
|
||||||
$message = json_decode($e->validator->getMessageBag(), 1);
|
|
||||||
nlog($message);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->assertTrue($response->headers->get('content-type') == 'application/pdf');
|
$this->assertTrue($response->headers->get('content-type') == 'application/pdf');
|
||||||
|
|
||||||
$response->assertStatus(200);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testClientStatementEmail()
|
public function testClientStatementEmail()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user