From 2ded966d653a2f0ec36e55b5316245f1a64ebb0e Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 2 Oct 2021 20:49:17 +0200 Subject: [PATCH] test fixes and added more tests --- Controller/ApiController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 99e2e49..a96bd91 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -185,7 +185,7 @@ final class ApiController extends Controller $unit = $this->createUnitFromRequest($request); $this->createModel($request->header->account, $unit, UnitMapper::class, 'unit', $request->getOrigin()); - if ($this->app->appSettings->get(null, SettingsEnum::GROUP_GENERATE_AUTOMATICALLY_UNIT)['content'] === '1') { + if ($this->app->appSettings->get(null, SettingsEnum::GROUP_GENERATE_AUTOMATICALLY_UNIT)->content === '1') { $newRequest = new HttpRequest(); $newRequest->setData('name', 'org:unit:' . \strtolower($unit->name)); $newRequest->setData('status', GroupStatus::ACTIVE); @@ -402,7 +402,7 @@ final class ApiController extends Controller $position = $this->createPositionFromRequest($request); $this->createModel($request->header->account, $position, PositionMapper::class, 'position', $request->getOrigin()); - if ($this->app->appSettings->get(null, SettingsEnum::GROUP_GENERATE_AUTOMATICALLY_POSITION)['content'] === '1') { + if ($this->app->appSettings->get(null, SettingsEnum::GROUP_GENERATE_AUTOMATICALLY_POSITION)->content === '1') { $newRequest = new HttpRequest(); $newRequest->setData('name', 'org:pos:' . \strtolower($position->name)); $newRequest->setData('status', GroupStatus::ACTIVE); @@ -580,7 +580,7 @@ final class ApiController extends Controller $department = $this->createDepartmentFromRequest($request); $this->createModel($request->header->account, $department, DepartmentMapper::class, 'department', $request->getOrigin()); - if ($this->app->appSettings->get(null, SettingsEnum::GROUP_GENERATE_AUTOMATICALLY_DEPARTMENT)['content'] === '1') { + if ($this->app->appSettings->get(null, SettingsEnum::GROUP_GENERATE_AUTOMATICALLY_DEPARTMENT)->content === '1') { $newRequest = new HttpRequest(); $newRequest->setData('name', 'org:dep:' . \strtolower($department->name)); $newRequest->setData('status', GroupStatus::ACTIVE);