summaryrefslogtreecommitdiff
path: root/tests/units/Model/AuthenticationTest.php
diff options
context:
space:
mode:
authorGerardo Zamudio <gerardozamudio@users.noreply.github.com>2016-02-24 23:48:50 -0600
committerGerardo Zamudio <gerardozamudio@users.noreply.github.com>2016-02-24 23:48:50 -0600
commite4de6b3898b64b26d29aff31f21df5fda8055686 (patch)
tree575f8a65440f291d70a070d168eafca8c82a6459 /tests/units/Model/AuthenticationTest.php
parentd9ffbea174ea6524d0a22f8375ca8b3aa04a3c96 (diff)
parenta6540bc604c837d92c9368540c145606723e97f7 (diff)
Merge pull request #1 from fguillot/master
Update from upstream
Diffstat (limited to 'tests/units/Model/AuthenticationTest.php')
-rw-r--r--tests/units/Model/AuthenticationTest.php39
1 files changed, 0 insertions, 39 deletions
diff --git a/tests/units/Model/AuthenticationTest.php b/tests/units/Model/AuthenticationTest.php
deleted file mode 100644
index 6b48affe..00000000
--- a/tests/units/Model/AuthenticationTest.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-require_once __DIR__.'/../Base.php';
-
-use Kanboard\Model\User;
-use Kanboard\Model\Authentication;
-
-class AuthenticationTest extends Base
-{
- public function testHasCaptcha()
- {
- $u = new User($this->container);
- $a = new Authentication($this->container);
-
- $this->assertFalse($a->hasCaptcha('not_found'));
- $this->assertFalse($a->hasCaptcha('admin'));
-
- $this->assertTrue($u->incrementFailedLogin('admin'));
- $this->assertTrue($u->incrementFailedLogin('admin'));
- $this->assertTrue($u->incrementFailedLogin('admin'));
-
- $this->assertFalse($a->hasCaptcha('not_found'));
- $this->assertTrue($a->hasCaptcha('admin'));
- }
-
- public function testHandleFailedLogin()
- {
- $u = new User($this->container);
- $a = new Authentication($this->container);
-
- $this->assertFalse($u->isLocked('admin'));
-
- for ($i = 0; $i <= 6; $i++) {
- $a->handleFailedLogin('admin');
- }
-
- $this->assertTrue($u->isLocked('admin'));
- }
-}