Expand test coverage.

This commit is contained in:
James Cole
2019-07-26 17:48:24 +02:00
parent 6ff4a0b45c
commit d94d34ca63
57 changed files with 2243 additions and 1597 deletions

View File

@@ -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);