mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -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),
|
||||
'type_id' => Payment::TYPE_CREDIT_CARD,
|
||||
'status_id' => Payment::STATUS_COMPLETED,
|
||||
'currency_id' => 1,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,8 @@ class ClientApiTest extends TestCase
|
||||
use MockAccountData;
|
||||
use ClientGroupSettingsSaver;
|
||||
|
||||
public $faker;
|
||||
|
||||
protected function setUp() :void
|
||||
{
|
||||
parent::setUp();
|
||||
@ -175,20 +177,16 @@ class ClientApiTest extends TestCase
|
||||
'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 = $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);
|
||||
}
|
||||
$response->assertStatus(200);
|
||||
|
||||
$this->assertTrue($response->headers->get('content-type') == 'application/pdf');
|
||||
|
||||
$response->assertStatus(200);
|
||||
|
||||
}
|
||||
|
||||
public function testClientStatementEmail()
|
||||
|
Loading…
x
Reference in New Issue
Block a user