diff options
author | Artur Neumann <artur@jankaritech.com> | 2023-05-19 12:27:20 +0545 |
---|---|---|
committer | Artur Neumann <artur@jankaritech.com> | 2023-05-19 12:27:20 +0545 |
commit | 67bba3537c4659f2afe2d97819d62f0098a7d442 (patch) | |
tree | 08b8fbf6d65ec6accb8e9471a0714d3588d6c36c /apps/oauth2 | |
parent | cb005f683507d675187e50186045bc27a8af3daa (diff) | |
download | nextcloud-server-67bba3537c4659f2afe2d97819d62f0098a7d442.tar.gz nextcloud-server-67bba3537c4659f2afe2d97819d62f0098a7d442.zip |
expect invalidateTokensOfUser only be called for seen users
Signed-off-by: Artur Neumann <artur@jankaritech.com>
Diffstat (limited to 'apps/oauth2')
-rw-r--r-- | apps/oauth2/tests/Controller/SettingsControllerTest.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/oauth2/tests/Controller/SettingsControllerTest.php b/apps/oauth2/tests/Controller/SettingsControllerTest.php index e79d7cbe34e..fe26fb4607a 100644 --- a/apps/oauth2/tests/Controller/SettingsControllerTest.php +++ b/apps/oauth2/tests/Controller/SettingsControllerTest.php @@ -135,10 +135,13 @@ class SettingsControllerTest extends TestCase { // count other users in the db before adding our own $count = 0; $function = function (IUser $user) use (&$count) { - $count++; + if ($user->getLastLogin() > 0) { + $count++; + } }; $userManager->callForAllUsers($function); $user1 = $userManager->createUser('test101', 'test101'); + $user1->updateLastLoginTimestamp(); $tokenProviderMock = $this->getMockBuilder(IAuthTokenProvider::class)->getMock(); // expect one call per user and ensure the correct client name |