summaryrefslogtreecommitdiff
path: root/tests/units/UserSessionTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-09-05 23:30:56 -0400
committerFrederic Guillot <fred@kanboard.net>2015-09-05 23:30:56 -0400
commit710f2c7bb046b43ec9878ae795a181101f6d7515 (patch)
treeb62723b6b49c3b6bf2b3ca41a772f552464a9031 /tests/units/UserSessionTest.php
parent94b38dd94bd819168163003beec8ef693f9d9839 (diff)
Improve unit tests
Diffstat (limited to 'tests/units/UserSessionTest.php')
-rw-r--r--tests/units/UserSessionTest.php32
1 files changed, 0 insertions, 32 deletions
diff --git a/tests/units/UserSessionTest.php b/tests/units/UserSessionTest.php
deleted file mode 100644
index 6a831183..00000000
--- a/tests/units/UserSessionTest.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-require_once __DIR__.'/Base.php';
-
-use Core\Session;
-use Model\UserSession;
-
-class UserSessionTest extends Base
-{
- public function testIsAdmin()
- {
- $s = new Session;
- $us = new UserSession($this->container);
-
- $this->assertFalse($us->isAdmin());
-
- $s['user'] = array();
- $this->assertFalse($us->isAdmin());
-
- $s['user'] = array('is_admin' => '1');
- $this->assertFalse($us->isAdmin());
-
- $s['user'] = array('is_admin' => false);
- $this->assertFalse($us->isAdmin());
-
- $s['user'] = array('is_admin' => '2');
- $this->assertFalse($us->isAdmin());
-
- $s['user'] = array('is_admin' => true);
- $this->assertTrue($us->isAdmin());
- }
-}