aboutsummaryrefslogtreecommitdiffstats
path: root/apps/oauth2
diff options
context:
space:
mode:
authorArtur Neumann <artur@jankaritech.com>2023-05-19 12:27:20 +0545
committerskjnldsv <skjnldsv@protonmail.com>2024-08-16 10:33:56 +0200
commit84ee79fe4378bbb10501e940bdcb80462fccb3a5 (patch)
treef5d3b667a7f02808700e865db745311927815603 /apps/oauth2
parentcc44ec54adc9280dc6f35dadcc87abcd2b56186a (diff)
downloadnextcloud-server-84ee79fe4378bbb10501e940bdcb80462fccb3a5.tar.gz
nextcloud-server-84ee79fe4378bbb10501e940bdcb80462fccb3a5.zip
fix: 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.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/oauth2/tests/Controller/SettingsControllerTest.php b/apps/oauth2/tests/Controller/SettingsControllerTest.php
index f73703f1929..181cfbfa5b7 100644
--- a/apps/oauth2/tests/Controller/SettingsControllerTest.php
+++ b/apps/oauth2/tests/Controller/SettingsControllerTest.php
@@ -123,10 +123,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