Add unit tests for new classes

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-06-19 18:00:06 +02:00
parent 1972edc38d
commit 7ad8080f82
22 changed files with 776 additions and 45 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ class AttachmentController extends Controller {
}
public function getAll($cardId) {
return $this->attachmentService->getAll($cardId);
return $this->attachmentService->findAll($cardId);
}
/**
+3 -1
View File
@@ -55,6 +55,8 @@ class AttachmentService {
* @param AttachmentMapper $attachmentMapper
* @param CardMapper $cardMapper
* @param PermissionService $permissionService
* @param Application $application
* @param ICacheFactory $cacheFactory
* @param $userId
* @throws \OCP\AppFramework\QueryException
*/
@@ -257,6 +259,6 @@ class AttachmentService {
}
} catch (InvalidAttachmentType $e) {
}
throw new NoPermissionException();
throw new NoPermissionException('Restore is not allowed.');
}
}