summaryrefslogtreecommitdiff
path: root/tests/units
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-07-10 14:18:10 -0400
committerFrederic Guillot <fred@kanboard.net>2016-07-10 14:18:10 -0400
commit34d0995d55e61474023bbd003d16ac3441d753b6 (patch)
tree992cf27c2fe01fbcb1928725752f86d1ca9ed913 /tests/units
parent8a85550f92020286ed11ef8f663029e70a6fedd0 (diff)
Cherry-pick from PR #2435 (Show TOTP Issuer)
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/Auth/TotpAuthTest.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/units/Auth/TotpAuthTest.php b/tests/units/Auth/TotpAuthTest.php
index c8dcfb28..3a82c01c 100644
--- a/tests/units/Auth/TotpAuthTest.php
+++ b/tests/units/Auth/TotpAuthTest.php
@@ -35,16 +35,17 @@ class TotpAuthTest extends Base
public function testGetUrl()
{
$provider = new TotpAuth($this->container);
+
$this->assertEmpty($provider->getQrCodeUrl('me'));
$this->assertEmpty($provider->getKeyUrl('me'));
$provider->setSecret('mySecret');
$this->assertEquals(
- 'https://chart.googleapis.com/chart?chs=200x200&cht=qr&chld=M|0&chl=otpauth%3A%2F%2Ftotp%2Fme%3Fsecret%3DmySecret',
+ 'https://chart.googleapis.com/chart?chs=200x200&cht=qr&chld=M|0&chl=otpauth%3A%2F%2Ftotp%2Fme%3Fsecret%3DmySecret%26issuer%3DKanboard',
$provider->getQrCodeUrl('me')
);
- $this->assertEquals('otpauth://totp/me?secret=mySecret', $provider->getKeyUrl('me'));
+ $this->assertEquals('otpauth://totp/me?secret=mySecret&issuer=Kanboard', $provider->getKeyUrl('me'));
}
public function testAuthentication()