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
35b1aaf507
commit
ee837b7cdd
@ -50,7 +50,8 @@ class EmailProductSalesReport
|
||||
'start_date' => $start_end_dates[0],
|
||||
'end_date' => $start_end_dates[1],
|
||||
'date_range' => 'custom',
|
||||
'client_id' => null
|
||||
'client_id' => null,
|
||||
'report_keys' => []
|
||||
];
|
||||
|
||||
$export = (new ProductSalesExport($this->scheduler->company, $data));
|
||||
|
@ -54,6 +54,8 @@ class SchedulerTest extends TestCase
|
||||
$this->withoutMiddleware(
|
||||
ThrottleRequests::class
|
||||
);
|
||||
|
||||
// $this->withoutExceptionHandling();
|
||||
}
|
||||
|
||||
|
||||
@ -67,15 +69,25 @@ class SchedulerTest extends TestCase
|
||||
'parameters' => [
|
||||
'date_range' => EmailStatement::LAST_MONTH,
|
||||
'clients' => [],
|
||||
'report_keys' => [],
|
||||
'client_id' => null,
|
||||
|
||||
],
|
||||
];
|
||||
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->token,
|
||||
])->postJson('/api/v1/task_schedulers', $data);
|
||||
$response = false;
|
||||
|
||||
$response->assertStatus(200);
|
||||
try {
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->token,
|
||||
])->postJson('/api/v1/task_schedulers', $data);
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
catch(\Exception $e){
|
||||
nlog($e->getMessage());
|
||||
}
|
||||
|
||||
$arr = $response->json();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user