mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Expand test coverage.
This commit is contained in:
@@ -77,8 +77,6 @@ class IndexController extends Controller
|
||||
*/
|
||||
public function create(string $importProvider)
|
||||
{
|
||||
|
||||
|
||||
$hasPreReq = (bool)config(sprintf('import.has_prereq.%s', $importProvider));
|
||||
$hasConfig = (bool)config(sprintf('import.has_job_config.%s', $importProvider));
|
||||
$allowedForDemo = (bool)config(sprintf('import.allowed_for_demo.%s', $importProvider));
|
||||
@@ -90,12 +88,13 @@ class IndexController extends Controller
|
||||
Log::debug(sprintf('Has prerequisites? %s', var_export($hasPreReq, true)));
|
||||
Log::debug(sprintf('Has config? %s', var_export($hasConfig, true)));
|
||||
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
if ($isDemoUser && !$allowedForDemo) {
|
||||
Log::debug('User is demo and this provider doesnt work for demo users.');
|
||||
|
||||
return redirect(route('import.index'));
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
$importJob = $this->repository->create($importProvider);
|
||||
|
||||
|
Reference in New Issue
Block a user