mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Add tests for the legacy tokens, fix some tests cases [skip ci]
This commit is contained in:
@@ -38,14 +38,14 @@ class ClearOauthSessionsTest extends TestCase {
|
||||
$task->notSince = 1519510065;
|
||||
$task->execute(mock(Queue::class));
|
||||
|
||||
$this->assertFalse(OauthSession::find()->andWhere(['id' => 3])->exists());
|
||||
$this->assertTrue(OauthSession::find()->andWhere(['id' => 4])->exists());
|
||||
$this->assertFalse(OauthSession::find()->andWhere(['legacy_id' => 3])->exists());
|
||||
$this->assertTrue(OauthSession::find()->andWhere(['legacy_id' => 4])->exists());
|
||||
|
||||
$task = new ClearOauthSessions();
|
||||
$task->clientId = 'deleted-oauth-client-with-sessions';
|
||||
$task->execute(mock(Queue::class));
|
||||
|
||||
$this->assertFalse(OauthSession::find()->andWhere(['id' => 4])->exists());
|
||||
$this->assertFalse(OauthSession::find()->andWhere(['legacy_id' => 4])->exists());
|
||||
|
||||
$task = new ClearOauthSessions();
|
||||
$task->clientId = 'some-not-exists-client-id';
|
||||
|
||||
Reference in New Issue
Block a user