mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-14 03:02:15 +01:00
Add local setup for S3
This commit is contained in:
committed by
Constantin Graf
parent
fc614b796c
commit
9a8945b0dc
@@ -8,6 +8,7 @@ use App\Models\Organization;
|
||||
use App\Service\Import\Importers\DefaultImporter;
|
||||
use App\Service\Import\Importers\ImportException;
|
||||
use App\Service\Import\Importers\TogglTimeEntriesImporter;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\Attributes\UsesClass;
|
||||
@@ -28,10 +29,14 @@ class TogglTimeEntriesImporterTest extends ImporterTestAbstract
|
||||
$data = Storage::disk('testfiles')->get('toggl_time_entries_import_test_1.csv');
|
||||
|
||||
// Act
|
||||
DB::enableQueryLog();
|
||||
DB::flushQueryLog();
|
||||
$importer->importData($data, $timezone);
|
||||
$report = $importer->getReport();
|
||||
$queryLog = DB::getQueryLog();
|
||||
|
||||
// Assert
|
||||
$this->assertCount(31, $queryLog);
|
||||
$testScenario = $this->checkTestScenarioAfterImportExcludingTimeEntries();
|
||||
$this->checkTimeEntries($testScenario);
|
||||
$this->assertSame(2, $report->timeEntriesCreated);
|
||||
@@ -55,10 +60,14 @@ class TogglTimeEntriesImporterTest extends ImporterTestAbstract
|
||||
$importer->init($organization);
|
||||
|
||||
// Act
|
||||
DB::enableQueryLog();
|
||||
DB::flushQueryLog();
|
||||
$importer->importData($data, $timezone);
|
||||
$report = $importer->getReport();
|
||||
$queryLog = DB::getQueryLog();
|
||||
|
||||
// Assert
|
||||
$this->assertCount(15, $queryLog);
|
||||
$testScenario = $this->checkTestScenarioAfterImportExcludingTimeEntries();
|
||||
$this->checkTimeEntries($testScenario, true);
|
||||
$this->assertSame(2, $report->timeEntriesCreated);
|
||||
|
||||
Reference in New Issue
Block a user