diff options
author | Gerardo Zamudio <gerardozamudio@users.noreply.github.com> | 2016-02-24 23:48:50 -0600 |
---|---|---|
committer | Gerardo Zamudio <gerardozamudio@users.noreply.github.com> | 2016-02-24 23:48:50 -0600 |
commit | e4de6b3898b64b26d29aff31f21df5fda8055686 (patch) | |
tree | 575f8a65440f291d70a070d168eafca8c82a6459 /tests/units/Auth/ReverseProxyTest.php | |
parent | d9ffbea174ea6524d0a22f8375ca8b3aa04a3c96 (diff) | |
parent | a6540bc604c837d92c9368540c145606723e97f7 (diff) |
Merge pull request #1 from fguillot/master
Update from upstream
Diffstat (limited to 'tests/units/Auth/ReverseProxyTest.php')
-rw-r--r-- | tests/units/Auth/ReverseProxyTest.php | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/units/Auth/ReverseProxyTest.php b/tests/units/Auth/ReverseProxyTest.php deleted file mode 100644 index 6aaa5a67..00000000 --- a/tests/units/Auth/ReverseProxyTest.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -require_once __DIR__.'/../Base.php'; - -use Kanboard\Auth\ReverseProxy; -use Kanboard\Model\User; - -class ReverseProxyTest extends Base -{ - public function setUp() - { - parent::setup(); - $_SERVER = array(); - } - - public function testFailedAuthentication() - { - $auth = new ReverseProxy($this->container); - $this->assertFalse($auth->authenticate()); - } - - public function testSuccessfulAuthentication() - { - $_SERVER[REVERSE_PROXY_USER_HEADER] = 'my_user'; - - $a = new ReverseProxy($this->container); - $u = new User($this->container); - - $this->assertTrue($a->authenticate()); - - $user = $u->getByUsername('my_user'); - $this->assertNotEmpty($user); - $this->assertEquals(0, $user['is_admin']); - $this->assertEquals(1, $user['is_ldap_user']); - $this->assertEquals(1, $user['disable_login_form']); - } -} |