diff options
author | Joas Schilling <coding@schilljs.com> | 2021-03-10 19:37:10 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-03-10 19:37:10 +0100 |
commit | 07095fd122b295d8ac1cbf8109f8ecbe6ac60801 (patch) | |
tree | 2fe28bcb4c9cab003d17c5351e2511e69f8296f3 /apps/settings/tests | |
parent | 1683e0289b20b6a0e1b94bae5853859df15c542e (diff) | |
download | nextcloud-server-07095fd122b295d8ac1cbf8109f8ecbe6ac60801.tar.gz nextcloud-server-07095fd122b295d8ac1cbf8109f8ecbe6ac60801.zip |
Also clear the knownUser when changing via the settings endpoint
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/settings/tests')
-rw-r--r-- | apps/settings/tests/Controller/UsersControllerTest.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/settings/tests/Controller/UsersControllerTest.php b/apps/settings/tests/Controller/UsersControllerTest.php index 1a9af2ea8c9..b14e8d00d60 100644 --- a/apps/settings/tests/Controller/UsersControllerTest.php +++ b/apps/settings/tests/Controller/UsersControllerTest.php @@ -32,6 +32,7 @@ namespace OCA\Settings\Tests\Controller; use OC\Accounts\AccountManager; use OC\Encryption\Exceptions\ModuleDoesNotExistsException; use OC\Group\Manager; +use OC\KnownUser\KnownUserService; use OCA\Settings\Controller\UsersController; use OCP\Accounts\IAccountManager; use OCP\App\IAppManager; @@ -91,6 +92,8 @@ class UsersControllerTest extends \Test\TestCase { private $securityManager; /** @var IManager | \PHPUnit\Framework\MockObject\MockObject */ private $encryptionManager; + /** @var KnownUserService|\PHPUnit\Framework\MockObject\MockObject */ + private $knownUserService; /** @var IEncryptionModule | \PHPUnit\Framework\MockObject\MockObject */ private $encryptionModule; /** @var IEventDispatcher|\PHPUnit\Framework\MockObject\MockObject */ @@ -111,6 +114,7 @@ class UsersControllerTest extends \Test\TestCase { $this->securityManager = $this->getMockBuilder(\OC\Security\IdentityProof\Manager::class)->disableOriginalConstructor()->getMock(); $this->jobList = $this->createMock(IJobList::class); $this->encryptionManager = $this->createMock(IManager::class); + $this->knownUserService = $this->createMock(KnownUserService::class); $this->dispatcher = $this->createMock(IEventDispatcher::class); $this->l->method('t') @@ -147,6 +151,7 @@ class UsersControllerTest extends \Test\TestCase { $this->securityManager, $this->jobList, $this->encryptionManager, + $this->knownUserService, $this->dispatcher ); } else { @@ -168,6 +173,7 @@ class UsersControllerTest extends \Test\TestCase { $this->securityManager, $this->jobList, $this->encryptionManager, + $this->knownUserService, $this->dispatcher ] )->setMethods($mockedMethods)->getMock(); |