summaryrefslogtreecommitdiff
path: root/tests/units/Model/AuthenticationTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-12-05 20:31:27 -0500
committerFrederic Guillot <fred@kanboard.net>2015-12-05 20:31:27 -0500
commite9fedf3e5cd63aea4da7a71f6647ee427c62fa49 (patch)
treeabc2de5aebace4a2d7c94805552264dab6b10bc7 /tests/units/Model/AuthenticationTest.php
parent346b8312e5ac877ce3192c2db3a26b500018bbb5 (diff)
Rewrite of the authentication and authorization system
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'));
- }
-}