summaryrefslogtreecommitdiff
path: root/tests/units
diff options
context:
space:
mode:
authorAurélien <cadiou.aurelien@gmail.com>2018-04-02 23:07:04 +0200
committerFrédéric Guillot <fred@kanboard.net>2018-04-02 14:07:04 -0700
commit5f7a3442d61b99e2fbad732bd0eaf9ad64398274 (patch)
tree78d2b159be9d2df92e28c90164430fdac2a4cac7 /tests/units
parentbc4457c4cb096a448d88ca882d30bae15aff56c3 (diff)
Add default filter per user
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/Core/User/UserSessionTest.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/units/Core/User/UserSessionTest.php b/tests/units/Core/User/UserSessionTest.php
index 5e7bab43..875eb959 100644
--- a/tests/units/Core/User/UserSessionTest.php
+++ b/tests/units/Core/User/UserSessionTest.php
@@ -20,6 +20,7 @@ class UserSessionTest extends Base
'is_ldap_user' => '0',
'twofactor_activated' => '0',
'role' => Role::APP_MANAGER,
+ 'filter' => 'status:close',
);
$userSession->initialize($user);
@@ -28,6 +29,7 @@ class UserSessionTest extends Base
$this->assertEquals(123, $_SESSION['user']['id']);
$this->assertEquals('john', $_SESSION['user']['username']);
$this->assertEquals(Role::APP_MANAGER, $_SESSION['user']['role']);
+ $this->assertEquals('status:close', $_SESSION['user']['filter']);
$this->assertFalse($_SESSION['user']['is_ldap_user']);
$this->assertFalse($_SESSION['user']['twofactor_activated']);
$this->assertArrayNotHasKey('password', $_SESSION['user']);
@@ -81,6 +83,9 @@ class UserSessionTest extends Base
public function testFilters()
{
$userSession = new UserSession($this->container);
+ $this->assertEquals('', $userSession->getFilters(1));
+
+ $_SESSION['user'] = array('filter' => 'status:open');
$this->assertEquals('status:open', $userSession->getFilters(1));
$userSession->setFilters(1, 'assignee:me');