mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Wrote export tests.
This commit is contained in:
@@ -264,6 +264,29 @@ class TestData
|
||||
DB::table('transaction_currencies')->insert($insert);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private function createExportJobs()
|
||||
{
|
||||
$insert = [];
|
||||
$disk = Storage::disk('export');
|
||||
foreach ($this->data['export-jobs'] as $job) {
|
||||
$insert[] = [
|
||||
'created_at' => $this->time,
|
||||
'updated_at' => $this->time,
|
||||
'user_id' => $job['user_id'],
|
||||
'key' => $job['key'],
|
||||
'status' => $job['status'],
|
||||
];
|
||||
$disk->put($job['key'] . '.zip', 'Nonsense data for "ziP" file.');
|
||||
}
|
||||
DB::table('export_jobs')->insert($insert);
|
||||
|
||||
// store fake export file:
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -863,6 +886,7 @@ class TestData
|
||||
$this->createMultiTransfers();
|
||||
$this->createImportJobs();
|
||||
$this->createCurrencies();
|
||||
$this->createExportJobs();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user