summaryrefslogtreecommitdiffstats
path: root/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-01-08 10:51:44 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-01-08 10:51:44 +0100
commit60d4b45e8924b2d8ccc2326a1f463ee9dae32905 (patch)
treebde191dd49f493e70749b56215aff7415128723e /tests/lib/Authentication/TwoFactorAuth/RegistryTest.php
parent69ae7abe72fd032adbec1c7dc01fca64aea2fbe8 (diff)
downloadnextcloud-server-60d4b45e8924b2d8ccc2326a1f463ee9dae32905.tar.gz
nextcloud-server-60d4b45e8924b2d8ccc2326a1f463ee9dae32905.zip
Clean up 2FA provider registry when a user is deleted
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Authentication/TwoFactorAuth/RegistryTest.php')
-rw-r--r--tests/lib/Authentication/TwoFactorAuth/RegistryTest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php b/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php
index 2f59d14992a..90fc4a9d27a 100644
--- a/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php
+++ b/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php
@@ -108,6 +108,16 @@ class RegistryTest extends TestCase {
$this->registry->disableProviderFor($provider, $user);
}
+ public function testDeleteUserData() {
+ $user = $this->createMock(IUser::class);
+ $user->expects($this->once())->method('getUID')->willReturn('user123');
+ $this->dao->expects($this->once())
+ ->method('deleteByUser')
+ ->with('user123');
+
+ $this->registry->deleteUserData($user);
+ }
+
public function testCleanUp() {
$this->dao->expects($this->once())
->method('deleteAll')