fix: unit tests

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2022-03-14 08:34:02 +01:00
parent c95c96fb40
commit 26c76fbb46
4 changed files with 20 additions and 19 deletions

View File

@@ -182,7 +182,7 @@ class BoardMapper extends QBMapper implements IPermissionMapper {
// shared with user
$qb->resetQueryParts();
$qb->selectDistinct('b.id', 'title', 'owner', 'color', 'archived', 'deleted_at', 'last_modified')
$qb->select('b.id', 'title', 'owner', 'color', 'archived', 'deleted_at', 'last_modified')
//->selectAlias('1', 'shared')
->from('deck_boards', 'b')
->innerJoin('b', 'deck_board_acl', 'acl', $qb->expr()->eq('b.id', 'acl.board_id'))
@@ -492,9 +492,9 @@ class BoardMapper extends QBMapper implements IPermissionMapper {
}
/**
* Reset Cache for a
* Reset Cache for a
* given board or a given user
*
*
* @param int|null $boardId
* @param int|null $userId
*/

View File

@@ -528,7 +528,7 @@ class BoardService {
$this->boardMapper->mapAcl($newAcl);
$this->changeHelper->boardChanged($boardId);
$board = $this->find($boardId);
$board = $this->boardMapper->find($boardId);
$this->clearBoardFromCache($board);
// TODO: use the dispatched event for this
@@ -731,7 +731,7 @@ class BoardService {
/**
* Clean a given board data
* from the Cache
*
*
* @param OCA\Deck\Db\Board $board
*/
private function clearBoardFromCache(Board $board) {

View File

@@ -241,6 +241,7 @@ class PermissionService {
if (array_key_exists((string) $boardId, $this->users) && !$refresh) {
return $this->users[(string) $boardId];
}
try {
$board = $this->boardMapper->find($boardId);
} catch (DoesNotExistException $e) {