mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
adjust oauth tests
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
This commit is contained in:
parent
c6da99474e
commit
32f984c520
2 changed files with 5 additions and 4 deletions
|
|
@ -59,7 +59,7 @@ class AccessToken extends Entity {
|
|||
$this->addType('clientId', 'int');
|
||||
$this->addType('hashedCode', 'string');
|
||||
$this->addType('encryptedToken', 'string');
|
||||
$this->addType('code_created_at', 'int');
|
||||
$this->addType('token_count', 'int');
|
||||
$this->addType('codeCreatedAt', 'int');
|
||||
$this->addType('tokenCount', 'int');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ namespace OCA\OAuth2\Tests\Db;
|
|||
|
||||
use OCA\OAuth2\Db\AccessToken;
|
||||
use OCA\OAuth2\Db\AccessTokenMapper;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use Test\TestCase;
|
||||
|
||||
/**
|
||||
|
|
@ -36,7 +37,7 @@ class AccessTokenMapperTest extends TestCase {
|
|||
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->accessTokenMapper = new AccessTokenMapper(\OC::$server->getDatabaseConnection());
|
||||
$this->accessTokenMapper = new AccessTokenMapper(\OC::$server->getDatabaseConnection(), \OC::$server->get(ITimeFactory::class));
|
||||
}
|
||||
|
||||
public function testGetByCode() {
|
||||
|
|
@ -54,7 +55,7 @@ class AccessTokenMapperTest extends TestCase {
|
|||
$this->accessTokenMapper->delete($token);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function testDeleteByClientId() {
|
||||
$this->expectException(\OCA\OAuth2\Exceptions\AccessTokenNotFoundException::class);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue