From 38f82f317547cec6207687499046f9868d5d3389 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sun, 20 Jul 2025 19:10:12 +0200 Subject: [PATCH] fixup! Add a two-step setup of OTP Signed-off-by: Kevin Decherf --- tests/Controller/ConfigControllerTest.php | 2 +- tests/Controller/SecurityControllerTest.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Controller/ConfigControllerTest.php b/tests/Controller/ConfigControllerTest.php index 734a25a69..e88131987 100644 --- a/tests/Controller/ConfigControllerTest.php +++ b/tests/Controller/ConfigControllerTest.php @@ -1328,7 +1328,7 @@ class ConfigControllerTest extends WallabagTestCase ->getRepository(User::class) ->findOneByUsername('admin'); - $this->assertEmpty($user->getGoogleAuthenticatorSecret()); + $this->assertNull($user->getGoogleAuthenticatorSecret()); $this->assertEmpty($user->getBackupCodes()); $this->assertFalse($user->isGoogleTwoFactor()); } diff --git a/tests/Controller/SecurityControllerTest.php b/tests/Controller/SecurityControllerTest.php index 3a90b1337..110b3ab7f 100644 --- a/tests/Controller/SecurityControllerTest.php +++ b/tests/Controller/SecurityControllerTest.php @@ -66,6 +66,7 @@ class SecurityControllerTest extends WallabagTestCase ->getRepository(User::class) ->findOneByUsername('admin'); $user->setGoogleAuthenticatorSecret('26LDIHYGHNELOQEM'); + $user->setGoogleAuthenticator(true); $em->persist($user); $em->flush(); @@ -78,6 +79,7 @@ class SecurityControllerTest extends WallabagTestCase ->getRepository(User::class) ->findOneByUsername('admin'); $user->setGoogleAuthenticatorSecret(null); + $user->setGoogleAuthenticator(false); $em->persist($user); $em->flush(); }