mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 16:31:33 +02:00
Fixes for tests
This commit is contained in:
parent
abf3afd75f
commit
1f7f7e5789
@ -16,6 +16,7 @@ use App\Models\Scheduler;
|
||||
use App\Mail\DownloadReport;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use App\Utils\Traits\MakesDates;
|
||||
use App\Jobs\Mail\NinjaMailerJob;
|
||||
use App\Jobs\Mail\NinjaMailerObject;
|
||||
use App\Export\CSV\ProductSalesExport;
|
||||
use App\DataMapper\Schedule\EmailStatement;
|
||||
|
@ -55,6 +55,29 @@ class SchedulerTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function testProductSalesReportGeneration()
|
||||
{
|
||||
$data = [
|
||||
'name' => 'A test product sales scheduler',
|
||||
'frequency_id' => RecurringInvoice::FREQUENCY_MONTHLY,
|
||||
'next_run' => now()->format('Y-m-d'),
|
||||
'template' => 'email_product_sales_report',
|
||||
'parameters' => [
|
||||
'date_range' => EmailStatement::LAST_MONTH,
|
||||
'clients' => [],
|
||||
],
|
||||
];
|
||||
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->token,
|
||||
])->postJson('/api/v1/task_schedulers', $data);
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
|
||||
public function testSchedulerGet3()
|
||||
{
|
||||
|
||||
@ -539,6 +562,7 @@ class SchedulerTest extends TestCase
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
|
||||
public function testDeleteSchedule()
|
||||
{
|
||||
$data = [
|
||||
|
Loading…
Reference in New Issue
Block a user