summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests/User_LDAPTest.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2019-06-26 14:18:28 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2019-06-26 14:18:28 +0200
commit108227ca6c32b6fc61a08fb6299a1951206f2cd9 (patch)
treef71a87a2f0e14971ddf0613129f6428e9b4ee6df /apps/user_ldap/tests/User_LDAPTest.php
parentbc276cdd83aeb40e70ccca4573b4318ca7dceb81 (diff)
downloadnextcloud-server-108227ca6c32b6fc61a08fb6299a1951206f2cd9.tar.gz
nextcloud-server-108227ca6c32b6fc61a08fb6299a1951206f2cd9.zip
invalidates user when plugin reported deletion success
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/tests/User_LDAPTest.php')
-rw-r--r--apps/user_ldap/tests/User_LDAPTest.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php
index 9b8bda2b808..7517994b34a 100644
--- a/apps/user_ldap/tests/User_LDAPTest.php
+++ b/apps/user_ldap/tests/User_LDAPTest.php
@@ -343,9 +343,27 @@ class User_LDAPTest extends TestCase {
$this->pluginManager->expects($this->once())
->method('deleteUser')
->with('uid')
- ->willReturn('result');
+ ->willReturn(true);
+
+ $this->config->expects($this->once())
+ ->method('getUserValue')
+ ->with('uid', 'user_ldap', 'isDeleted', 0)
+ ->willReturn(1);
+
+ $mapper = $this->createMock(UserMapping::class);
+ $mapper->expects($this->once())
+ ->method('unmap')
+ ->with('uid');
+
+ $this->access->expects($this->atLeastOnce())
+ ->method('getUserMapper')
+ ->willReturn($mapper);
+
+ $this->userManager->expects($this->once())
+ ->method('invalidate')
+ ->with('uid');
- $this->assertEquals($this->backend->deleteUser('uid'),'result');
+ $this->assertEquals(true, $this->backend->deleteUser('uid'));
}
/**