Fix integration tests

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-12-30 14:33:38 +01:00
parent 74814ad614
commit b26caaa6e5
2 changed files with 5 additions and 6 deletions

View File

@@ -32,6 +32,7 @@ use OCA\Deck\NoPermissionException;
use OCP\IConfig;
use OCP\IGroup;
use OCP\IGroupManager;
use OCP\IUserSession;
class ConfigService {
public const SETTING_BOARD_NOTIFICATION_DUE_OFF = 'off';
@@ -46,9 +47,10 @@ class ConfigService {
public function __construct(
IConfig $config,
IGroupManager $groupManager,
$userId
IUserSession $userSession
) {
$this->userId = $userId;
// Session is required here in order to make the tests properly inject the userId later on
$this->userId = $userSession->getUser() ? $userSession->getUser()->getUID() : null;
$this->groupManager = $groupManager;
$this->config = $config;
}