Skip to content

Commit

Permalink
Fixed Test
Browse files Browse the repository at this point in the history
Signed-off-by: Arne Hamann <git@arne.email>
  • Loading branch information
tacruc committed Aug 29, 2023
1 parent 76d221c commit be5a6cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/DB/DeviceShareMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function findByDeviceId($deviceId) {
$qb->select('*')
->from($this->getTableName())
->where(
$qb->expr()->eq('device_id', $qb->createNamedParameter($deviceId, IQueryBuilder::PARAM_INT::PARAM_STR))
$qb->expr()->eq('device_id', $qb->createNamedParameter($deviceId, IQueryBuilder::PARAM_INT))
);

return $this->findEntities($qb);
Expand Down
6 changes: 6 additions & 0 deletions tests/Unit/Controller/DevicesControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace OCA\Maps\Controller;

use OCA\Maps\DB\DeviceShareMapper;
use OCP\Files\IRootFolder;
use \OCP\IServerContainer;
use \OCA\Maps\AppInfo\Application;
use \OCA\Maps\Service\DevicesService;
Expand Down Expand Up @@ -91,7 +93,9 @@ protected function setUp(): void {
$c->query(IServerContainer::class)->getL10N($c->query('AppName')),
$c->query(IServerContainer::class)->getLogger(),
$c->query(DevicesService::class),
$c->query(DeviceShareMapper::class),
$c->query(IServerContainer::class)->getDateTimeZone(),
$c->query(IRootFolder::class),
'test'
);

Expand All @@ -107,7 +111,9 @@ protected function setUp(): void {
$c->query(IServerContainer::class)->getL10N($c->query('AppName')),
$c->query(IServerContainer::class)->getLogger(),
$c->query(DevicesService::class),
$c->query(DeviceShareMapper::class),
$c->query(IServerContainer::class)->getDateTimeZone(),
$c->query(IRootFolder::class),
'test2'
);

Expand Down

0 comments on commit be5a6cf

Please sign in to comment.