From 24eca896c574284a5c54f831981b870b158a7722 Mon Sep 17 00:00:00 2001 From: REJack Date: Sun, 10 Feb 2019 16:32:12 +0100 Subject: [PATCH] updated TOTPTest --- tests/Aauth/Libraries/Aauth/TOTPTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/Aauth/Libraries/Aauth/TOTPTest.php b/tests/Aauth/Libraries/Aauth/TOTPTest.php index fce21b8..ba423d0 100644 --- a/tests/Aauth/Libraries/Aauth/TOTPTest.php +++ b/tests/Aauth/Libraries/Aauth/TOTPTest.php @@ -153,10 +153,11 @@ class TOTPTest extends CIDatabaseTestCase ]); $this->assertFalse($this->library->verifyUserTotpCode('999000', 1)); - $totp = TOTP::create('JBSWY3DPEHPK3PXP'); - $totp->setLabel(''); + $totp = TOTP::create('JBSWY3DPEHPK3PXP'); + $totpCode = $totp->now(); + usleep(1000); - $this->assertTrue($this->library->verifyUserTotpCode($totp->now(), 1)); + $this->assertTrue($this->library->verifyUserTotpCode($totpCode, 1)); } /**